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

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


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

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

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

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


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

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

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


/* Type Conversion Predeclarations */

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

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

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

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

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

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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* "numpy.pxd":764
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif

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


/*--- Type declarations ---*/
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr;
struct __pyx_obj_6pandas_5tslib__TSObject;
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE;
struct __pyx_obj_6pandas_5tslib__Timestamp;
struct __pyx_obj_6pandas_5tslib__NaT;
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__;
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr;

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

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

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

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

/* "pandas/tslib.pyx":2777
 * # period accessors
 * 
 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN             # <<<<<<<<<<<<<<
 * 
 * def get_period_field(int code, int64_t value, int freq):
 */
typedef int (*__pyx_t_6pandas_5tslib_accessor)(__pyx_t_5numpy_int64_t, int);

/* "pandas/tslib.pyx":2845
 *     return ordinals
 * 
 * cpdef resolution(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
struct __pyx_opt_args_6pandas_5tslib_resolution {
  int __pyx_n;
  PyObject *tz;
};
struct __pyx_defaults {
  PyObject *__pyx_arg_warn;
};

/* "pandas/tslib.pyx":3188
 *         else:
 *             return ''
 *         regex = '|'.join(re_escape(stuff) for stuff in to_convert)             # <<<<<<<<<<<<<<
 *         regex = '(?P<%s>%s' % (directive, regex)
 *         return '%s)' % regex
 */
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_outer_scope;
  PyObject *__pyx_v_stuff;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "pandas/tslib.pyx":741
 * 
 * # lightweight C object to hold datetime & int64 pair
 * cdef class _TSObject:             # <<<<<<<<<<<<<<
 *     cdef:
 *         pandas_datetimestruct dts      # pandas_datetimestruct
 */
struct __pyx_obj_6pandas_5tslib__TSObject {
  PyObject_HEAD
  pandas_datetimestruct dts;
  __pyx_t_5numpy_int64_t value;
  PyObject *tzinfo;
};


/* "pandas/tslib.pyx":3173
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))
 * 
 *     def __seqToRE(self, to_convert, directive):             # <<<<<<<<<<<<<<
 *         """Convert a list to a regex string for matching a directive.
 * 
 */
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE {
  PyObject_HEAD
  PyObject *__pyx_v_to_convert;
};


/* "pandas/tslib.pyx":563
 * # (see Timestamp class above). This will serve as a C extension type that
 * # shadows the python class, where we do any heavy lifting.
 * cdef class _Timestamp(datetime):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value, nanosecond
 */
struct __pyx_obj_6pandas_5tslib__Timestamp {
  PyDateTime_DateTime __pyx_base;
  struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *__pyx_vtab;
  __pyx_t_5numpy_int64_t value;
  __pyx_t_5numpy_int64_t nanosecond;
  PyObject *offset;
};


/* "pandas/tslib.pyx":707
 * 
 * 
 * cdef class _NaT(_Timestamp):             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(_NaT self):
 */
struct __pyx_obj_6pandas_5tslib__NaT {
  struct __pyx_obj_6pandas_5tslib__Timestamp __pyx_base;
};


/* "pandas/tslib.pyx":3131
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ {
  PyObject_HEAD
  PyObject *__pyx_v_self;
};


/* "pandas/tslib.pyx":3164
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone             # <<<<<<<<<<<<<<
 *                                         for tz in tz_names),
 *                                 'Z'),
 */
struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_outer_scope;
  PyObject *__pyx_v_tz;
  PyObject *__pyx_v_tz_names;
  PyObject *__pyx_t_0;
  PyObject *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
};



/* "pandas/tslib.pyx":563
 * # (see Timestamp class above). This will serve as a C extension type that
 * # shadows the python class, where we do any heavy lifting.
 * cdef class _Timestamp(datetime):             # <<<<<<<<<<<<<<
 *     cdef readonly:
 *         int64_t value, nanosecond
 */

struct __pyx_vtabstruct_6pandas_5tslib__Timestamp {
  int (*_compare_outside_nanorange)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyDateTime_DateTime *, int);
  int (*_assert_tzawareness_compat)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *);
  PyDateTime_DateTime *(*to_datetime)(struct __pyx_obj_6pandas_5tslib__Timestamp *, int __pyx_skip_dispatch);
  PyObject *(*_get_field)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *__pyx_vtabptr_6pandas_5tslib__Timestamp;


/* "pandas/tslib.pyx":707
 * 
 * 
 * cdef class _NaT(_Timestamp):             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(_NaT self):
 */

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

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

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

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

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

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

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

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

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

#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

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

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

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

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

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

static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_mod___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /* proto */

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

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

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

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

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

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

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

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

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

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
                                             int is_tuple, int has_known_size, int decref_tuple);

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

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

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

#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
  static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /* proto */

#define UNARY_NEG_WOULD_OVERFLOW(x)            (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

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

static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
        Py_INCREF(Py_None);
        return Py_None; /* this is just to have an accurate signature */
    } else {
        PyObject *r, *m;
        m = __Pyx_GetAttrString(L, "append");
        if (!m) return NULL;
        r = PyObject_CallFunctionObjArgs(m, x, NULL);
        Py_DECREF(m);
        return r;
    }
}

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

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

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

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

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64);

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

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


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

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

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);

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

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

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

static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *);

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32);

static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/

static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *);

#include "descrobject.h"
static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*proto*/

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

static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

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

static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

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

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

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

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

#define __Pyx_Generator_USED
#include <structmember.h>
#include <frameobject.h>
typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_generator_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    int resume_label;
    char is_running;  // using T_BOOL for property below requires char value
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure);
static int __pyx_Generator_init(void);
static int __Pyx_Generator_clear(PyObject* self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static int __Pyx_check_binary_version(void);

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/

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

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

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

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

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

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

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


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

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

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

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

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

/* Module declarations from 'numpy' */

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

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

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

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

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

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

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

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

/* Module declarations from '__builtin__' */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from 'cpython' */

/* Module declarations from 'datetime' */

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

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

/* Module declarations from 'khash' */

/* Module declarations from 'cython' */

/* Module declarations from 'pandas.tslib' */
static PyTypeObject *__pyx_ptype_6pandas_5tslib__Timestamp = 0;
static PyTypeObject *__pyx_ptype_6pandas_5tslib__NaT = 0;
static PyTypeObject *__pyx_ptype_6pandas_5tslib__TSObject = 0;
static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__ = 0;
static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE = 0;
static PyTypeObject *__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr = 0;
static int __pyx_v_6pandas_5tslib_PY2;
static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib_NPY_NAT;
static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib__NS_LOWER_BOUND;
static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib__NS_UPPER_BOUND;
static pandas_datetimestruct __pyx_v_6pandas_5tslib__NS_MIN_DTS;
static pandas_datetimestruct __pyx_v_6pandas_5tslib__NS_MAX_DTS;
static int __pyx_v_6pandas_5tslib__reverse_ops[6];
static PyObject *__pyx_v_6pandas_5tslib__NDIM_STRING = 0;
static PyTypeObject *__pyx_v_6pandas_5tslib_ts_type;
static int __pyx_v_6pandas_5tslib__nat_scalar_rules[6];
static __pyx_t_5numpy_int64_t __pyx_v_6pandas_5tslib_DAY_NS;
static char __pyx_v_6pandas_5tslib_START;
static char __pyx_v_6pandas_5tslib_END;
static PyObject *__pyx_v_6pandas_5tslib_extra_fmts = 0;
static PyObject *__pyx_v_6pandas_5tslib_str_extra_fmts = 0;
static PyObject *__pyx_f_6pandas_5tslib_convert_to_tsobject(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_convert_to_timedelta64(PyObject *, PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5tslib__checknull_with_nat(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_nat_dt(struct __pyx_obj_6pandas_5tslib__NaT *, struct __pyx_obj_6pandas_5tslib__Timestamp *, int); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_get_value_box(PyArrayObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5tslib_is_timestamp(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib__get_utcoffset(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE void __pyx_f_6pandas_5tslib__localize_tso(struct __pyx_obj_6pandas_5tslib__TSObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_utc(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_zone(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__check_dts_bounds(pandas_datetimestruct *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_datetime64_nanos(PyObject *); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_cast_from_unit(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_6pandas_5tslib_total_seconds(PyObject *); /*proto*/
static PyArrayObject *__pyx_f_6pandas_5tslib__unbox_utcoffsets(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib__ensure_int64(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_t_5numpy_int64_t *, __pyx_t_5numpy_int64_t, Py_ssize_t); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib__normalize_local(PyArrayObject *, PyObject *); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib__normalized_stamp(pandas_datetimestruct *); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_ts_dayofweek(struct __pyx_obj_6pandas_5tslib__TSObject *); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_normalize_date(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(PyArrayObject *, int, PyObject *); /*proto*/
static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_asfreq(__pyx_t_5numpy_int64_t, int, int, int, int __pyx_skip_dispatch); /*proto*/
static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_t_5numpy_int64_t, int, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib__period_strftime(__pyx_t_5numpy_int64_t, int, PyObject *); /*proto*/
static __pyx_t_6pandas_5tslib_accessor __pyx_f_6pandas_5tslib__get_accessor_func(int); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_resolution(PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5tslib_resolution *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_5tslib__reso_stamp(pandas_datetimestruct *); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib__reso_local(PyArrayObject *, PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int64_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };
#define __Pyx_MODULE_NAME "pandas.tslib"
int __pyx_module_is_main_pandas__tslib = 0;

/* Implementation of 'pandas.tslib' */
static PyObject *__pyx_builtin_NameError;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_round;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_lambda_funcdef_6pandas_5tslib_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_ints_to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_2_is_tzlocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_4_is_fixed_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_2now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_4today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts_input, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_18tz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_20freq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_26to_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_32week(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_34quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_38asm8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_4__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_8get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_12apply_offset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_offset); /* proto */
static Py_hash_t __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_6pandas_5tslib_4_NaT___hash__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_delta); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_16_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_18get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_20datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_24parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_26array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_raise_, PyObject *__pyx_v_dayfirst, CYTHON_UNUSED PyObject *__pyx_v_format, PyObject *__pyx_v_utc, PyObject *__pyx_v_coerce, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_28array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_30convert_to_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_32repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_34array_strptime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_fmt, PyObject *__pyx_v_coerce); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_36cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_40pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_42i8_to_pydt(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_i8, CYTHON_UNUSED PyObject *__pyx_v_tzinfo); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_44tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_46tz_convert_single(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_val, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_48_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_50_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_52tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_56tz_localize_to_utc(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz, int __pyx_v_infer_dst); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_58build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_60get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_62get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_64date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_66dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_68isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_70monthrange(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year, __pyx_t_5numpy_int64_t __pyx_v_month); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_72normalize_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtarr, int __pyx_v_freq, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_78period_asfreq(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_80period_asfreq_arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_82period_ordinal(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_y, int __pyx_v_m, int __pyx_v_d, int __pyx_v_h, int __pyx_v_min, int __pyx_v_s, int __pyx_v_us, int __pyx_v_ps, int __pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_86period_format(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_88get_period_field(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_90get_period_field_arr(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, PyArrayObject *__pyx_v_arr, int __pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_92extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_94resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_96_getlang(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_front); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale_time); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_to_convert, PyObject *__pyx_v_directive); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_4pattern(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_6compile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_year, PyObject *__pyx_v_week_of_year, PyObject *__pyx_v_day_of_week, PyObject *__pyx_v_week_starts_Mon); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static char __pyx_k_2[] = "%z";
static char __pyx_k_5[] = " %%Z";
static char __pyx_k_7[] = "'%s'";
static char __pyx_k_8[] = "Timestamp('%s', tz=%s)";
static char __pyx_k_9[] = "%d-%.2d-%.2d";
static char __pyx_k_10[] = "%.2d:%.2d:%.2d";
static char __pyx_k_11[] = ".%.9d";
static char __pyx_k_12[] = ".%.6d";
static char __pyx_k_13[] = "%s %s";
static char __pyx_k_14[] = "pandas.tseries.period";
static char __pyx_k_18[] = "M8[ns]";
static char __pyx_k_20[] = "Cannot localize tz-aware Timestamp, use tz_convert for conversions";
static char __pyx_k_22[] = "Cannot convert tz-naive Timestamp, use tz_localize to localize";
static char __pyx_k_24[] = "Warning: discarding nonzero nanoseconds";
static char __pyx_k_25[] = "";
static char __pyx_k_26[] = "%.3d";
static char __pyx_k_27[] = " %%Z, tz=%s";
static char __pyx_k_28[] = ", tz=%s";
static char __pyx_k_29[] = "index out of bounds";
static char __pyx_k_32[] = "Cannot compare type %r with type %r";
static char __pyx_k_33[] = "Cannot compare tz-naive and tz-aware timestamps";
static char __pyx_k_36[] = "timedelta64[ns]";
static char __pyx_k_38[] = "Cannot add integral value to Timestamp without offset.";
static char __pyx_k_40[] = "_delta_to_nanoseconds";
static char __pyx_k_42[] = "Could not construct Timestamp from argument %s";
static char __pyx_k_43[] = "%d-%.2d-%.2d %.2d:%.2d:%.2d";
static char __pyx_k_44[] = "Out of bounds nanosecond timestamp: %s";
static char __pyx_k_46[] = "Array must be all same time zone";
static char __pyx_k_48[] = "Cannot mix tz-aware with tz-naive values";
static char __pyx_k_50[] = "Unrecognized value type: %s";
static char __pyx_k_52[] = "_not_datelike_strings";
static char __pyx_k_53[] = "_does_string_look_like_datetime";
static char __pyx_k_54[] = "Given date string not likely a datetime.";
static char __pyx_k_60[] = "Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True";
static char __pyx_k_62[] = "parse_datetime_string";
static char __pyx_k_63[] = "mixed datetimes and integers in passed array";
static char __pyx_k_66[] = "m8[ns]";
static char __pyx_k_70[] = "m8[{0}]";
static char __pyx_k_72[] = "_np_version_under1p7";
static char __pyx_k_73[] = "Invalid type for timedelta scalar: %s";
static char __pyx_k_76[] = "%02d";
static char __pyx_k_77[] = "%02d.%06d";
static char __pyx_k_78[] = "-";
static char __pyx_k_79[] = "%s%d days, %02d:%02d:%s";
static char __pyx_k_80[] = "%s%d days";
static char __pyx_k_81[] = "%s%02d:%02d:%s";
static char __pyx_k_83[] = "\\";
static char __pyx_k_84[] = "%";
static char __pyx_k_85[] = "'%s' is a bad directive in format '%s'";
static char __pyx_k_86[] = "stray %% in format '%s'";
static char __pyx_k_89[] = "time data %r does not match format %r";
static char __pyx_k_90[] = "unconverted data remains: %s";
static char __pyx_k_92[] = "_calc_julian_from_U_or_W";
static char __pyx_k_93[] = "NumPy 1.6.1 business freq not supported";
static char __pyx_k_96[] = "First time before start of DST info";
static char __pyx_k__0[] = "0";
static char __pyx_k__2[] = "2";
static char __pyx_k__3[] = "3";
static char __pyx_k__A[] = "A";
static char __pyx_k__B[] = "B";
static char __pyx_k__D[] = "D";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";
static char __pyx_k__L[] = "L";
static char __pyx_k__M[] = "M";
static char __pyx_k__O[] = "O";
static char __pyx_k__P[] = "P";
static char __pyx_k__Q[] = "Q";
static char __pyx_k__S[] = "S";
static char __pyx_k__T[] = "T";
static char __pyx_k__U[] = "U";
static char __pyx_k__W[] = "W";
static char __pyx_k__X[] = "X";
static char __pyx_k__Y[] = "Y";
static char __pyx_k__Z[] = "Z";
static char __pyx_k__a[] = "a";
static char __pyx_k__b[] = "b";
static char __pyx_k__c[] = "c";
static char __pyx_k__d[] = "d";
static char __pyx_k__f[] = "f";
static char __pyx_k__g[] = "g";
static char __pyx_k__h[] = "h";
static char __pyx_k__i[] = "i";
static char __pyx_k__j[] = "j";
static char __pyx_k__k[] = "k";
static char __pyx_k__l[] = "l";
static char __pyx_k__m[] = "m";
static char __pyx_k__n[] = "n";
static char __pyx_k__p[] = "p";
static char __pyx_k__q[] = "q";
static char __pyx_k__s[] = "s";
static char __pyx_k__t[] = "t";
static char __pyx_k__u[] = "u";
static char __pyx_k__v[] = "v";
static char __pyx_k__w[] = "w";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
static char __pyx_k_101[] = "_utc_transition_times";
static char __pyx_k_103[] = "Could not find pytz module";
static char __pyx_k_105[] = "Cannot infer dst time from %s asthere are no repeated times";
static char __pyx_k_106[] = "There are %i dst switches when there should only be 1.";
static char __pyx_k_107[] = "Cannot infer dst time from %r, try using the 'infer_dst' argument";
static char __pyx_k_108[] = "NonExistentTimeError";
static char __pyx_k_116[] = "Field %s not supported";
static char __pyx_k_117[] = "bad month number 0; must be 1-12";
static char __pyx_k_119[] = "Unrecognized type: %s";
static char __pyx_k_121[] = "Frequency conversion failed";
static char __pyx_k_123[] = "Unable to convert to desired frequency.";
static char __pyx_k_125[] = "%Y";
static char __pyx_k_126[] = "%FQ%q";
static char __pyx_k_127[] = "%Y-%m";
static char __pyx_k_128[] = "%s/%s";
static char __pyx_k_129[] = "%Y-%m-%d";
static char __pyx_k_130[] = "%Y-%m-%d %H:00";
static char __pyx_k_131[] = "%Y-%m-%d %H:%M";
static char __pyx_k_132[] = "%Y-%m-%d %H:%M:%S";
static char __pyx_k_133[] = "%Y-%m-%d %H:%M:%S.%l";
static char __pyx_k_134[] = "%Y-%m-%d %H:%M:%S.%u";
static char __pyx_k_135[] = "%Y-%m-%d %H:%M:%S.%n";
static char __pyx_k_136[] = "Unknown freq: %d";
static char __pyx_k_137[] = "utf-8";
static char __pyx_k_139[] = "Unable to get quarter and year";
static char __pyx_k_141[] = "%d";
static char __pyx_k_142[] = "%.2d";
static char __pyx_k_143[] = "%03d";
static char __pyx_k_144[] = "%06d";
static char __pyx_k_145[] = "%09d";
static char __pyx_k_147[] = "Unrecognized period code: %d";
static char __pyx_k_148[] = "%s is wrong freq";
static char __pyx_k_149[] = "_LocaleTime__calc_weekday";
static char __pyx_k_150[] = "_LocaleTime__calc_month";
static char __pyx_k_151[] = "_LocaleTime__calc_am_pm";
static char __pyx_k_152[] = "_LocaleTime__calc_timezone";
static char __pyx_k_153[] = "_LocaleTime__calc_date_time";
static char __pyx_k_154[] = "locale changed during initialization";
static char __pyx_k_158[] = "%p";
static char __pyx_k_161[] = "%c";
static char __pyx_k_162[] = "%x";
static char __pyx_k_163[] = "%X";
static char __pyx_k_164[] = "%%";
static char __pyx_k_166[] = "%A";
static char __pyx_k_167[] = "%B";
static char __pyx_k_168[] = "%a";
static char __pyx_k_169[] = "%b";
static char __pyx_k_171[] = "%y";
static char __pyx_k_173[] = "%H";
static char __pyx_k_175[] = "%M";
static char __pyx_k_177[] = "%S";
static char __pyx_k_179[] = "%j";
static char __pyx_k_182[] = "%m";
static char __pyx_k_185[] = "%w";
static char __pyx_k_187[] = "%I";
static char __pyx_k_189[] = "%Z";
static char __pyx_k_196[] = "%W";
static char __pyx_k_197[] = "%U";
static char __pyx_k_198[] = "(?P<d>3[0-1]|[1-2]\\d|0[1-9]|[1-9]| [1-9])";
static char __pyx_k_199[] = "(?P<f>[0-9]{1,6})";
static char __pyx_k_200[] = "(?P<H>2[0-3]|[0-1]\\d|\\d)";
static char __pyx_k_201[] = "(?P<I>1[0-2]|0[1-9]|[1-9])";
static char __pyx_k_202[] = "(?P<j>36[0-6]|3[0-5]\\d|[1-2]\\d\\d|0[1-9]\\d|00[1-9]|[1-9]\\d|0[1-9]|[1-9])";
static char __pyx_k_203[] = "(?P<m>1[0-2]|0[1-9]|[1-9])";
static char __pyx_k_204[] = "(?P<M>[0-5]\\d|\\d)";
static char __pyx_k_205[] = "(?P<S>6[0-1]|[0-5]\\d|\\d)";
static char __pyx_k_206[] = "(?P<U>5[0-3]|[0-4]\\d|\\d)";
static char __pyx_k_207[] = "(?P<w>[0-6])";
static char __pyx_k_208[] = "(?P<y>\\d\\d)";
static char __pyx_k_209[] = "(?P<Y>\\d\\d\\d\\d)";
static char __pyx_k_212[] = "|";
static char __pyx_k_213[] = "(?P<%s>%s";
static char __pyx_k_214[] = "%s)";
static char __pyx_k_215[] = "([\\\\.^$*+?\\(\\){}\\[\\]|])";
static char __pyx_k_217[] = "\\\\\\1";
static char __pyx_k_218[] = "\\s+";
static char __pyx_k_221[] = "%s%s%s";
static char __pyx_k_222[] = "%s%s";
static char __pyx_k_223[] = "Unable to parse %s";
static char __pyx_k_224[] = "ndarray is not C contiguous";
static char __pyx_k_226[] = "ndarray is not Fortran contiguous";
static char __pyx_k_228[] = "Non-native byte order not supported";
static char __pyx_k_230[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_231[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_234[] = "Format string allocated too short.";
static char __pyx_k_238[] = "pandas.compat";
static char __pyx_k_239[] = "distutils.version";
static char __pyx_k_240[] = "1.6";
static char __pyx_k_241[] = "_np_version_under1p6";
static char __pyx_k_242[] = "1.7";
static char __pyx_k_247[] = "/mnt/home/jreback/pandas/pandas/tslib.pyx";
static char __pyx_k_248[] = "pandas.tslib";
static char __pyx_k_249[] = "dateutil.tz";
static char __pyx_k_312[] = "TimeStamp is the pandas equivalent of python's Datetime\n    and is interchangable with it in most cases. It's the type used\n    for the entries that make up a DatetimeIndex, and other timeseries\n    oriented data structures in pandas.\n    ";
static char __pyx_k_325[] = "(N)ot-(A)-(T)ime, the time equivalent of NaN";
static char __pyx_k_338[] = "datetime_to_datetime64";
static char __pyx_k_347[] = "array_to_timedelta64";
static char __pyx_k_350[] = "convert_to_timedelta";
static char __pyx_k_389[] = "dt64arr_to_periodarr";
static char __pyx_k_392[] = "periodarr_to_dt64arr";
static char __pyx_k_399[] = "%q";
static char __pyx_k_400[] = "^`AB`^";
static char __pyx_k_402[] = "%f";
static char __pyx_k_403[] = "^`CD`^";
static char __pyx_k_405[] = "%F";
static char __pyx_k_406[] = "^`EF`^";
static char __pyx_k_408[] = "%l";
static char __pyx_k_409[] = "^`GH`^";
static char __pyx_k_411[] = "%u";
static char __pyx_k_412[] = "^`IJ`^";
static char __pyx_k_414[] = "%n";
static char __pyx_k_415[] = "^`KL`^";
static char __pyx_k_421[] = "get_period_field_arr";
static char __pyx_k_424[] = "_thread_allocate_lock";
static char __pyx_k_440[] = "Stores and handles locale-specific information related to time.\n\n    ATTRIBUTES:\n        f_weekday -- full weekday names (7-item list)\n        a_weekday -- abbreviated weekday names (7-item list)\n        f_month -- full month names (13-item list; dummy value in [0], which\n                    is added by code)\n        a_month -- abbreviated month names (13-item list, dummy value in\n                    [0], which is added by code)\n        am_pm -- AM/PM representation (2-item list)\n        LC_date_time -- format string for date/time representation (string)\n        LC_date -- format string for date representation (string)\n        LC_time -- format string for time representation (string)\n        timezone -- daylight- and non-daylight-savings timezone representation\n                    (2-item list of sets)\n        lang -- Language used by instance (2-item tuple)\n    ";
static char __pyx_k_446[] = "whitespace_replacement";
static char __pyx_k_451[] = "Handle conversion from format directives to regexes.";
static char __pyx_k__00[] = "00";
static char __pyx_k__03[] = "03";
static char __pyx_k__10[] = "10";
static char __pyx_k__11[] = "11";
static char __pyx_k__17[] = "17";
static char __pyx_k__22[] = "22";
static char __pyx_k__44[] = "44";
static char __pyx_k__55[] = "55";
static char __pyx_k__76[] = "76";
static char __pyx_k__99[] = "99";
static char __pyx_k__M8[] = "M8";
static char __pyx_k__Zd[] = "Zd";
static char __pyx_k__Zf[] = "Zf";
static char __pyx_k__Zg[] = "Zg";
static char __pyx_k__dt[] = "dt";
static char __pyx_k__i4[] = "i4";
static char __pyx_k__i8[] = "i8";
static char __pyx_k__ms[] = "ms";
static char __pyx_k__np[] = "np";
static char __pyx_k__ns[] = "ns";
static char __pyx_k__ps[] = "ps";
static char __pyx_k__re[] = "re";
static char __pyx_k__sp[] = "sp";
static char __pyx_k__sz[] = "sz";
static char __pyx_k__td[] = "td";
static char __pyx_k__ts[] = "ts";
static char __pyx_k__tz[] = "tz";
static char __pyx_k__us[] = "us";
static char __pyx_k__NAN[] = "NAN";
static char __pyx_k__NAT[] = "NAT";
static char __pyx_k__NaN[] = "NaN";
static char __pyx_k__NaT[] = "NaT";
static char __pyx_k__UTC[] = "UTC";
static char __pyx_k__U_W[] = "U_W";
static char __pyx_k___ts[] = "_ts";
static char __pyx_k__abs[] = "abs";
static char __pyx_k__all[] = "all";
static char __pyx_k__arr[] = "arr";
static char __pyx_k__cls[] = "cls";
static char __pyx_k__day[] = "day";
static char __pyx_k__dow[] = "dow";
static char __pyx_k__doy[] = "doy";
static char __pyx_k__dts[] = "dts";
static char __pyx_k__end[] = "end";
static char __pyx_k__err[] = "err";
static char __pyx_k__fmt[] = "fmt";
static char __pyx_k__get[] = "get";
static char __pyx_k__gmt[] = "gmt";
static char __pyx_k__grp[] = "grp";
static char __pyx_k__idx[] = "idx";
static char __pyx_k__inf[] = "inf";
static char __pyx_k__key[] = "key";
static char __pyx_k__len[] = "len";
static char __pyx_k__loc[] = "loc";
static char __pyx_k__max[] = "max";
static char __pyx_k__min[] = "min";
static char __pyx_k__mus[] = "mus";
static char __pyx_k__nan[] = "nan";
static char __pyx_k__nat[] = "nat";
static char __pyx_k__new[] = "new";
static char __pyx_k__now[] = "now";
static char __pyx_k__num[] = "num";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__old[] = "old";
static char __pyx_k__out[] = "out";
static char __pyx_k__pos[] = "pos";
static char __pyx_k__ret[] = "ret";
static char __pyx_k__sep[] = "sep";
static char __pyx_k__seq[] = "seq";
static char __pyx_k__sub[] = "sub";
static char __pyx_k__sys[] = "sys";
static char __pyx_k__tso[] = "tso";
static char __pyx_k__tz1[] = "tz1";
static char __pyx_k__tz2[] = "tz2";
static char __pyx_k__utc[] = "utc";
static char __pyx_k__val[] = "val";
static char __pyx_k__woy[] = "woy";
static char __pyx_k__1999[] = "1999";
static char __pyx_k__None[] = "None";
static char __pyx_k__ampm[] = "ampm";
static char __pyx_k__args[] = "args";
static char __pyx_k__asm8[] = "asm8";
static char __pyx_k__base[] = "base";
static char __pyx_k__code[] = "code";
static char __pyx_k__date[] = "date";
static char __pyx_k__days[] = "days";
static char __pyx_k__diff[] = "diff";
static char __pyx_k__fget[] = "fget";
static char __pyx_k__fill[] = "fill";
static char __pyx_k__flat[] = "flat";
static char __pyx_k__frac[] = "frac";
static char __pyx_k__freq[] = "freq";
static char __pyx_k__func[] = "func";
static char __pyx_k__hour[] = "hour";
static char __pyx_k__iNaT[] = "iNaT";
static char __pyx_k__item[] = "item";
static char __pyx_k__join[] = "join";
static char __pyx_k__kwds[] = "kwds";
static char __pyx_k__lang[] = "lang";
static char __pyx_k__left[] = "left";
static char __pyx_k__long[] = "long";
static char __pyx_k__ndim[] = "ndim";
static char __pyx_k__prop[] = "prop";
static char __pyx_k__pydt[] = "pydt";
static char __pyx_k__pytz[] = "pytz";
static char __pyx_k__self[] = "self";
static char __pyx_k__side[] = "side";
static char __pyx_k__sign[] = "sign";
static char __pyx_k__size[] = "size";
static char __pyx_k__sort[] = "sort";
static char __pyx_k__time[] = "time";
static char __pyx_k__unit[] = "unit";
static char __pyx_k__vals[] = "vals";
static char __pyx_k__view[] = "view";
static char __pyx_k__warn[] = "warn";
static char __pyx_k__week[] = "week";
static char __pyx_k__year[] = "year";
static char __pyx_k__zone[] = "zone";
static char __pyx_k____pad[] = "__pad";
static char __pyx_k__a_idx[] = "a_idx";
static char __pyx_k__am_pm[] = "am_pm";
static char __pyx_k__apply[] = "apply";
static char __pyx_k__array[] = "array";
static char __pyx_k__b_idx[] = "b_idx";
static char __pyx_k__base1[] = "base1";
static char __pyx_k__base2[] = "base2";
static char __pyx_k__boxed[] = "boxed";
static char __pyx_k__clear[] = "clear";
static char __pyx_k__count[] = "count";
static char __pyx_k__delta[] = "delta";
static char __pyx_k__dtarr[] = "dtarr";
static char __pyx_k__dtype[] = "dtype";
static char __pyx_k__empty[] = "empty";
static char __pyx_k__field[] = "field";
static char __pyx_k__finfo[] = "finfo";
static char __pyx_k__found[] = "found";
static char __pyx_k__freq1[] = "freq1";
static char __pyx_k__freq2[] = "freq2";
static char __pyx_k__front[] = "front";
static char __pyx_k__hours[] = "hours";
static char __pyx_k__index[] = "index";
static char __pyx_k__int32[] = "int32";
static char __pyx_k__int64[] = "int64";
static char __pyx_k__lower[] = "lower";
static char __pyx_k__match[] = "match";
static char __pyx_k__month[] = "month";
static char __pyx_k__nanos[] = "nanos";
static char __pyx_k__numpy[] = "numpy";
static char __pyx_k__range[] = "range";
static char __pyx_k__ravel[] = "ravel";
static char __pyx_k__regex[] = "regex";
static char __pyx_k__right[] = "right";
static char __pyx_k__round[] = "round";
static char __pyx_k__shape[] = "shape";
static char __pyx_k__short[] = "short";
static char __pyx_k__stamp[] = "stamp";
static char __pyx_k__state[] = "state";
static char __pyx_k__super[] = "super";
static char __pyx_k__table[] = "table";
static char __pyx_k__tdata[] = "tdata";
static char __pyx_k__today[] = "today";
static char __pyx_k__trans[] = "trans";
static char __pyx_k__tzset[] = "tzset";
static char __pyx_k__tzutc[] = "tzutc";
static char __pyx_k__value[] = "value";
static char __pyx_k__where[] = "where";
static char __pyx_k__years[] = "years";
static char __pyx_k__D_RESO[] = "D_RESO";
static char __pyx_k__H_RESO[] = "H_RESO";
static char __pyx_k__Period[] = "Period";
static char __pyx_k__S_RESO[] = "S_RESO";
static char __pyx_k__T_RESO[] = "T_RESO";
static char __pyx_k__TimeRE[] = "TimeRE";
static char __pyx_k__astype[] = "astype";
static char __pyx_k__coerce[] = "coerce";
static char __pyx_k__decode[] = "decode";
static char __pyx_k__deltas[] = "deltas";
static char __pyx_k__encode[] = "encode";
static char __pyx_k__escape[] = "escape";
static char __pyx_k__extend[] = "extend";
static char __pyx_k__fields[] = "fields";
static char __pyx_k__format[] = "format";
static char __pyx_k__hstack[] = "hstack";
static char __pyx_k__ignore[] = "ignore";
static char __pyx_k__insert[] = "insert";
static char __pyx_k__isleap[] = "isleap";
static char __pyx_k__ivalue[] = "ivalue";
static char __pyx_k__julian[] = "julian";
static char __pyx_k__kwargs[] = "kwargs";
static char __pyx_k__locale[] = "locale";
static char __pyx_k__micros[] = "micros";
static char __pyx_k__minute[] = "minute";
static char __pyx_k__mo_off[] = "mo_off";
static char __pyx_k__months[] = "months";
static char __pyx_k__np_NaT[] = "np_NaT";
static char __pyx_k__ntrans[] = "ntrans";
static char __pyx_k__object[] = "object";
static char __pyx_k__offset[] = "offset";
static char __pyx_k__raise_[] = "raise_";
static char __pyx_k__result[] = "result";
static char __pyx_k__second[] = "second";
static char __pyx_k__sorted[] = "sorted";
static char __pyx_k__stamps[] = "stamps";
static char __pyx_k__thread[] = "thread";
static char __pyx_k__tzinfo[] = "tzinfo";
static char __pyx_k__tzname[] = "tzname";
static char __pyx_k__utcnow[] = "utcnow";
static char __pyx_k__values[] = "values";
static char __pyx_k__LC_TIME[] = "LC_TIME";
static char __pyx_k__LC_date[] = "LC_date";
static char __pyx_k__LC_time[] = "LC_time";
static char __pyx_k__NaTType[] = "NaTType";
static char __pyx_k__US_RESO[] = "US_RESO";
static char __pyx_k____add__[] = "__add__";
static char __pyx_k____all__[] = "__all__";
static char __pyx_k____new__[] = "__new__";
static char __pyx_k____str__[] = "__str__";
static char __pyx_k____sub__[] = "__sub__";
static char __pyx_k___du_utc[] = "_du_utc";
static char __pyx_k___thread[] = "_thread";
static char __pyx_k__a_month[] = "a_month";
static char __pyx_k__both_eq[] = "both_eq";
static char __pyx_k__combine[] = "combine";
static char __pyx_k__compile[] = "compile";
static char __pyx_k__dtindex[] = "dtindex";
static char __pyx_k__f_month[] = "f_month";
static char __pyx_k__freqstr[] = "freqstr";
static char __pyx_k__genexpr[] = "genexpr";
static char __pyx_k__iresult[] = "iresult";
static char __pyx_k__ivalues[] = "ivalues";
static char __pyx_k__maximum[] = "maximum";
static char __pyx_k__minutes[] = "minutes";
static char __pyx_k__nonzero[] = "nonzero";
static char __pyx_k__ordinal[] = "ordinal";
static char __pyx_k__oresult[] = "oresult";
static char __pyx_k__pattern[] = "pattern";
static char __pyx_k__quarter[] = "quarter";
static char __pyx_k__replace[] = "replace";
static char __pyx_k__reverse[] = "reverse";
static char __pyx_k__seconds[] = "seconds";
static char __pyx_k__squeeze[] = "squeeze";
static char __pyx_k__ts_base[] = "ts_base";
static char __pyx_k__tzlocal[] = "tzlocal";
static char __pyx_k__uniques[] = "uniques";
static char __pyx_k__version[] = "version";
static char __pyx_k__weekday[] = "weekday";
static char __pyx_k__KeyError[] = "KeyError";
static char __pyx_k____exit__[] = "__exit__";
static char __pyx_k____hash__[] = "__hash__";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
static char __pyx_k____repr__[] = "__repr__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k___getlang[] = "_getlang";
static char __pyx_k___tzinfos[] = "_tzinfos";
static char __pyx_k__both_nat[] = "both_nat";
static char __pyx_k__calendar[] = "calendar";
static char __pyx_k__datetime[] = "datetime";
static char __pyx_k__day_abbr[] = "day_abbr";
static char __pyx_k__day_name[] = "day_name";
static char __pyx_k__dayfirst[] = "dayfirst";
static char __pyx_k__daylight[] = "daylight";
static char __pyx_k__fraction[] = "fraction";
static char __pyx_k__iterkeys[] = "iterkeys";
static char __pyx_k__localize[] = "localize";
static char __pyx_k__one_diff[] = "one_diff";
static char __pyx_k__ordinals[] = "ordinals";
static char __pyx_k__property[] = "property";
static char __pyx_k__relation[] = "relation";
static char __pyx_k__result_a[] = "result_a";
static char __pyx_k__result_b[] = "result_b";
static char __pyx_k__sa_dtype[] = "sa_dtype";
static char __pyx_k__strftime[] = "strftime";
static char __pyx_k__timezone[] = "timezone";
static char __pyx_k__ts_input[] = "ts_input";
static char __pyx_k__utc_date[] = "utc_date";
static char __pyx_k__year2000[] = "year2000";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__NameError[] = "NameError";
static char __pyx_k__Timestamp[] = "Timestamp";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k____enter__[] = "__enter__";
static char __pyx_k____seqToRE[] = "__seqToRE";
static char __pyx_k__a_weekday[] = "a_weekday";
static char __pyx_k__date_time[] = "date_time";
static char __pyx_k__dayofweek[] = "dayofweek";
static char __pyx_k__dayofyear[] = "dayofyear";
static char __pyx_k__directive[] = "directive";
static char __pyx_k__dst_hours[] = "dst_hours";
static char __pyx_k__enumerate[] = "enumerate";
static char __pyx_k__f_weekday[] = "f_weekday";
static char __pyx_k__getlocale[] = "getlocale";
static char __pyx_k__group_key[] = "group_key";
static char __pyx_k__groupdict[] = "groupdict";
static char __pyx_k__have_pytz[] = "have_pytz";
static char __pyx_k__infer_dst[] = "infer_dst";
static char __pyx_k__isoformat[] = "isoformat";
static char __pyx_k__no_saving[] = "no_saving";
static char __pyx_k__normalize[] = "normalize";
static char __pyx_k__periodarr[] = "periodarr";
static char __pyx_k__re_escape[] = "re_escape";
static char __pyx_k__timedelta[] = "timedelta";
static char __pyx_k__to_period[] = "to_period";
static char __pyx_k__toordinal[] = "toordinal";
static char __pyx_k__trans_grp[] = "trans_grp";
static char __pyx_k__trans_idx[] = "trans_idx";
static char __pyx_k__trans_len[] = "trans_len";
static char __pyx_k__tz_values[] = "tz_values";
static char __pyx_k__utc_dates[] = "utc_dates";
static char __pyx_k__utcoffset[] = "utcoffset";
static char __pyx_k__IGNORECASE[] = "IGNORECASE";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__LocaleTime[] = "LocaleTime";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k____reduce__[] = "__reduce__";
static char __pyx_k___date_repr[] = "_date_repr";
static char __pyx_k___get_field[] = "_get_field";
static char __pyx_k___repr_base[] = "_repr_base";
static char __pyx_k___time_repr[] = "_time_repr";
static char __pyx_k___utcoffset[] = "_utcoffset";
static char __pyx_k___zero_time[] = "_zero_time";
static char __pyx_k__astimezone[] = "astimezone";
static char __pyx_k__basestring[] = "basestring";
static char __pyx_k__compat_NaT[] = "compat_NaT";
static char __pyx_k__datetime64[] = "datetime64";
static char __pyx_k__found_dict[] = "found_dict";
static char __pyx_k__found_zone[] = "found_zone";
static char __pyx_k__freq_group[] = "freq_group";
static char __pyx_k__has_saving[] = "has_saving";
static char __pyx_k__i8_to_pydt[] = "i8_to_pydt";
static char __pyx_k__isleapyear[] = "isleapyear";
static char __pyx_k__month_abbr[] = "month_abbr";
static char __pyx_k__month_name[] = "month_name";
static char __pyx_k__monthrange[] = "monthrange";
static char __pyx_k__nanosecond[] = "nanosecond";
static char __pyx_k__new_values[] = "new_values";
static char __pyx_k__parse_code[] = "parse_code";
static char __pyx_k__parse_date[] = "parse_date";
static char __pyx_k__pydt_to_i8[] = "pydt_to_i8";
static char __pyx_k__re_compile[] = "re_compile";
static char __pyx_k__startswith[] = "startswith";
static char __pyx_k__switch_idx[] = "switch_idx";
static char __pyx_k__time_tuple[] = "time_tuple";
static char __pyx_k__to_convert[] = "to_convert";
static char __pyx_k__tz_convert[] = "tz_convert";
static char __pyx_k__weekofyear[] = "weekofyear";
static char __pyx_k____getitem__[] = "__getitem__";
static char __pyx_k____setitem__[] = "__setitem__";
static char __pyx_k___cache_lock[] = "_cache_lock";
static char __pyx_k___get_deltas[] = "_get_deltas";
static char __pyx_k___is_tzlocal[] = "_is_tzlocal";
static char __pyx_k___np_version[] = "_np_version";
static char __pyx_k__array_split[] = "array_split";
static char __pyx_k__date_string[] = "date_string";
static char __pyx_k__day_of_week[] = "day_of_week";
static char __pyx_k__fromordinal[] = "fromordinal";
static char __pyx_k__idx_shifted[] = "idx_shifted";
static char __pyx_k__inferred_tz[] = "inferred_tz";
static char __pyx_k__isleap_prev[] = "isleap_prev";
static char __pyx_k__locale_time[] = "locale_time";
static char __pyx_k__logical_and[] = "logical_and";
static char __pyx_k__microsecond[] = "microsecond";
static char __pyx_k__regex_chars[] = "regex_chars";
static char __pyx_k__sign_pretty[] = "sign_pretty";
static char __pyx_k__struct_time[] = "struct_time";
static char __pyx_k__timedelta64[] = "timedelta64";
static char __pyx_k__to_datetime[] = "to_datetime";
static char __pyx_k__tot_seconds[] = "tot_seconds";
static char __pyx_k__trans_cache[] = "trans_cache";
static char __pyx_k__tz_localize[] = "tz_localize";
static char __pyx_k__utc_convert[] = "utc_convert";
static char __pyx_k__LC_date_time[] = "LC_date_time";
static char __pyx_k__LooseVersion[] = "LooseVersion";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k____calc_am_pm[] = "__calc_am_pm";
static char __pyx_k____calc_month[] = "__calc_month";
static char __pyx_k____setstate__[] = "__setstate__";
static char __pyx_k___nat_strings[] = "_nat_strings";
static char __pyx_k___regex_cache[] = "_regex_cache";
static char __pyx_k__apply_offset[] = "apply_offset";
static char __pyx_k__days_to_week[] = "days_to_week";
static char __pyx_k__dummy_thread[] = "dummy_thread";
static char __pyx_k__format_regex[] = "format_regex";
static char __pyx_k__get_timezone[] = "get_timezone";
static char __pyx_k__microseconds[] = "microseconds";
static char __pyx_k__object_state[] = "object_state";
static char __pyx_k__searchsorted[] = "searchsorted";
static char __pyx_k__seen_integer[] = "seen_integer";
static char __pyx_k__version_info[] = "version_info";
static char __pyx_k__week_of_year[] = "week_of_year";
static char __pyx_k___TimeRE_cache[] = "_TimeRE_cache";
static char __pyx_k___dummy_thread[] = "_dummy_thread";
static char __pyx_k___month_offset[] = "_month_offset";
static char __pyx_k__allocate_lock[] = "allocate_lock";
static char __pyx_k__bad_directive[] = "bad_directive";
static char __pyx_k__datetime_date[] = "datetime_date";
static char __pyx_k__datetime_time[] = "datetime_time";
static char __pyx_k__first_weekday[] = "first_weekday";
static char __pyx_k__period_format[] = "period_format";
static char __pyx_k__seen_datetime[] = "seen_datetime";
static char __pyx_k__short_version[] = "short_version";
static char __pyx_k__to_pydatetime[] = "to_pydatetime";
static char __pyx_k__total_seconds[] = "total_seconds";
static char __pyx_k__unique_deltas[] = "unique_deltas";
static char __pyx_k__week_0_length[] = "week_0_length";
static char __pyx_k__AttributeError[] = "AttributeError";
static char __pyx_k____calc_weekday[] = "__calc_weekday";
static char __pyx_k__array_strptime[] = "array_strptime";
static char __pyx_k__current_format[] = "current_format";
static char __pyx_k__date_normalize[] = "date_normalize";
static char __pyx_k__get_date_field[] = "get_date_field";
static char __pyx_k__period_ordinal[] = "period_ordinal";
static char __pyx_k__seconds_pretty[] = "seconds_pretty";
static char __pyx_k___CACHE_MAX_SIZE[] = "_CACHE_MAX_SIZE";
static char __pyx_k____calc_timezone[] = "__calc_timezone";
static char __pyx_k__datetime_result[] = "datetime_result";
static char __pyx_k__directive_index[] = "directive_index";
static char __pyx_k__get_time_micros[] = "get_time_micros";
static char __pyx_k__week_starts_Mon[] = "week_starts_Mon";
static char __pyx_k___LocaleTime__pad[] = "_LocaleTime__pad";
static char __pyx_k___TimeRE__seqToRE[] = "_TimeRE__seqToRE";
static char __pyx_k____calc_date_time[] = "__calc_date_time";
static char __pyx_k___get_transitions[] = "_get_transitions";
static char __pyx_k___is_fixed_offset[] = "_is_fixed_offset";
static char __pyx_k___transition_info[] = "_transition_info";
static char __pyx_k__dates_normalized[] = "dates_normalized";
static char __pyx_k__extract_ordinals[] = "extract_ordinals";
static char __pyx_k__get_period_field[] = "get_period_field";
static char __pyx_k__processed_format[] = "processed_format";
static char __pyx_k__repr_timedelta64[] = "repr_timedelta64";
static char __pyx_k__utc_offset_cache[] = "utc_offset_cache";
static char __pyx_k___parse_code_table[] = "_parse_code_table";
static char __pyx_k__array_to_datetime[] = "array_to_datetime";
static char __pyx_k__period_asfreq_arr[] = "period_asfreq_arr";
static char __pyx_k__replacement_pairs[] = "replacement_pairs";
static char __pyx_k__tz_convert_single[] = "tz_convert_single";
static char __pyx_k__AmbiguousTimeError[] = "AmbiguousTimeError";
static char __pyx_k__build_field_sarray[] = "build_field_sarray";
static char __pyx_k__ints_to_pydatetime[] = "ints_to_pydatetime";
static char __pyx_k__is_timestamp_array[] = "is_timestamp_array";
static char __pyx_k__tz_localize_to_utc[] = "tz_localize_to_utc";
static char __pyx_k__week_of_year_start[] = "week_of_year_start";
static char __pyx_k__OutOfBoundsDatetime[] = "OutOfBoundsDatetime";
static char __pyx_k___has_time_component[] = "_has_time_component";
static char __pyx_k__cast_to_nanoseconds[] = "cast_to_nanoseconds";
static PyObject *__pyx_kp_s_10;
static PyObject *__pyx_n_s_101;
static PyObject *__pyx_kp_s_103;
static PyObject *__pyx_kp_s_105;
static PyObject *__pyx_kp_s_106;
static PyObject *__pyx_kp_s_107;
static PyObject *__pyx_n_s_108;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_kp_s_116;
static PyObject *__pyx_kp_s_117;
static PyObject *__pyx_kp_s_119;
static PyObject *__pyx_kp_s_12;
static PyObject *__pyx_kp_s_121;
static PyObject *__pyx_kp_s_123;
static PyObject *__pyx_kp_b_125;
static PyObject *__pyx_kp_s_125;
static PyObject *__pyx_kp_b_126;
static PyObject *__pyx_kp_b_127;
static PyObject *__pyx_kp_s_128;
static PyObject *__pyx_kp_b_129;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_b_130;
static PyObject *__pyx_kp_b_131;
static PyObject *__pyx_kp_b_132;
static PyObject *__pyx_kp_b_133;
static PyObject *__pyx_kp_b_134;
static PyObject *__pyx_kp_b_135;
static PyObject *__pyx_kp_s_136;
static PyObject *__pyx_kp_s_137;
static PyObject *__pyx_kp_s_139;
static PyObject *__pyx_n_s_14;
static PyObject *__pyx_kp_s_141;
static PyObject *__pyx_kp_s_142;
static PyObject *__pyx_kp_s_143;
static PyObject *__pyx_kp_s_144;
static PyObject *__pyx_kp_s_145;
static PyObject *__pyx_kp_s_147;
static PyObject *__pyx_kp_s_148;
static PyObject *__pyx_n_s_149;
static PyObject *__pyx_n_s_150;
static PyObject *__pyx_n_s_151;
static PyObject *__pyx_n_s_152;
static PyObject *__pyx_n_s_153;
static PyObject *__pyx_kp_s_154;
static PyObject *__pyx_kp_s_158;
static PyObject *__pyx_kp_s_161;
static PyObject *__pyx_kp_s_162;
static PyObject *__pyx_kp_s_163;
static PyObject *__pyx_kp_s_164;
static PyObject *__pyx_kp_s_166;
static PyObject *__pyx_kp_s_167;
static PyObject *__pyx_kp_s_168;
static PyObject *__pyx_kp_s_169;
static PyObject *__pyx_kp_s_171;
static PyObject *__pyx_kp_s_173;
static PyObject *__pyx_kp_s_175;
static PyObject *__pyx_kp_s_177;
static PyObject *__pyx_kp_s_179;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_182;
static PyObject *__pyx_kp_s_185;
static PyObject *__pyx_kp_s_187;
static PyObject *__pyx_kp_s_189;
static PyObject *__pyx_kp_s_196;
static PyObject *__pyx_kp_s_197;
static PyObject *__pyx_kp_s_198;
static PyObject *__pyx_kp_s_199;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_20;
static PyObject *__pyx_kp_s_200;
static PyObject *__pyx_kp_s_201;
static PyObject *__pyx_kp_s_202;
static PyObject *__pyx_kp_s_203;
static PyObject *__pyx_kp_s_204;
static PyObject *__pyx_kp_s_205;
static PyObject *__pyx_kp_s_206;
static PyObject *__pyx_kp_s_207;
static PyObject *__pyx_kp_s_208;
static PyObject *__pyx_kp_s_209;
static PyObject *__pyx_kp_s_212;
static PyObject *__pyx_kp_s_213;
static PyObject *__pyx_kp_s_214;
static PyObject *__pyx_kp_s_215;
static PyObject *__pyx_kp_s_217;
static PyObject *__pyx_kp_s_218;
static PyObject *__pyx_kp_s_22;
static PyObject *__pyx_kp_s_221;
static PyObject *__pyx_kp_s_222;
static PyObject *__pyx_kp_s_223;
static PyObject *__pyx_kp_u_224;
static PyObject *__pyx_kp_u_226;
static PyObject *__pyx_kp_u_228;
static PyObject *__pyx_kp_u_230;
static PyObject *__pyx_kp_u_231;
static PyObject *__pyx_kp_u_234;
static PyObject *__pyx_n_s_238;
static PyObject *__pyx_n_s_239;
static PyObject *__pyx_kp_s_24;
static PyObject *__pyx_kp_s_240;
static PyObject *__pyx_n_s_241;
static PyObject *__pyx_kp_s_242;
static PyObject *__pyx_kp_s_247;
static PyObject *__pyx_n_s_248;
static PyObject *__pyx_n_s_249;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_kp_s_26;
static PyObject *__pyx_kp_s_27;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_312;
static PyObject *__pyx_kp_s_32;
static PyObject *__pyx_kp_s_325;
static PyObject *__pyx_kp_s_33;
static PyObject *__pyx_n_s_338;
static PyObject *__pyx_n_s_347;
static PyObject *__pyx_n_s_350;
static PyObject *__pyx_kp_s_36;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_n_s_389;
static PyObject *__pyx_n_s_392;
static PyObject *__pyx_kp_b_399;
static PyObject *__pyx_n_s_40;
static PyObject *__pyx_kp_b_400;
static PyObject *__pyx_kp_s_400;
static PyObject *__pyx_kp_b_402;
static PyObject *__pyx_kp_b_403;
static PyObject *__pyx_kp_s_403;
static PyObject *__pyx_kp_b_405;
static PyObject *__pyx_kp_b_406;
static PyObject *__pyx_kp_s_406;
static PyObject *__pyx_kp_b_408;
static PyObject *__pyx_kp_b_409;
static PyObject *__pyx_kp_s_409;
static PyObject *__pyx_kp_b_411;
static PyObject *__pyx_kp_b_412;
static PyObject *__pyx_kp_s_412;
static PyObject *__pyx_kp_b_414;
static PyObject *__pyx_kp_b_415;
static PyObject *__pyx_kp_s_415;
static PyObject *__pyx_kp_s_42;
static PyObject *__pyx_n_s_421;
static PyObject *__pyx_n_s_424;
static PyObject *__pyx_kp_s_43;
static PyObject *__pyx_kp_s_44;
static PyObject *__pyx_kp_s_440;
static PyObject *__pyx_n_s_446;
static PyObject *__pyx_kp_s_451;
static PyObject *__pyx_kp_s_46;
static PyObject *__pyx_kp_s_48;
static PyObject *__pyx_kp_s_5;
static PyObject *__pyx_kp_s_50;
static PyObject *__pyx_n_s_52;
static PyObject *__pyx_n_s_53;
static PyObject *__pyx_kp_s_54;
static PyObject *__pyx_kp_s_60;
static PyObject *__pyx_n_s_62;
static PyObject *__pyx_kp_s_63;
static PyObject *__pyx_kp_s_66;
static PyObject *__pyx_kp_s_7;
static PyObject *__pyx_kp_s_70;
static PyObject *__pyx_n_s_72;
static PyObject *__pyx_kp_s_73;
static PyObject *__pyx_kp_s_76;
static PyObject *__pyx_kp_s_77;
static PyObject *__pyx_kp_s_78;
static PyObject *__pyx_kp_s_79;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_kp_s_80;
static PyObject *__pyx_kp_s_81;
static PyObject *__pyx_kp_s_83;
static PyObject *__pyx_kp_s_84;
static PyObject *__pyx_kp_s_85;
static PyObject *__pyx_kp_s_86;
static PyObject *__pyx_kp_s_89;
static PyObject *__pyx_kp_s_9;
static PyObject *__pyx_kp_s_90;
static PyObject *__pyx_n_s_92;
static PyObject *__pyx_kp_s_93;
static PyObject *__pyx_kp_s_96;
static PyObject *__pyx_kp_s__0;
static PyObject *__pyx_kp_s__00;
static PyObject *__pyx_kp_s__03;
static PyObject *__pyx_kp_s__10;
static PyObject *__pyx_kp_s__11;
static PyObject *__pyx_kp_s__17;
static PyObject *__pyx_kp_s__1999;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_kp_s__22;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_s__44;
static PyObject *__pyx_kp_s__55;
static PyObject *__pyx_kp_s__76;
static PyObject *__pyx_kp_s__99;
static PyObject *__pyx_n_s__A;
static PyObject *__pyx_n_s__AmbiguousTimeError;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_s__B;
static PyObject *__pyx_n_s__D;
static PyObject *__pyx_n_s__D_RESO;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__H;
static PyObject *__pyx_n_s__H_RESO;
static PyObject *__pyx_n_s__I;
static PyObject *__pyx_n_s__IGNORECASE;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_s__KeyError;
static PyObject *__pyx_n_s__LC_TIME;
static PyObject *__pyx_n_s__LC_date;
static PyObject *__pyx_n_s__LC_date_time;
static PyObject *__pyx_n_s__LC_time;
static PyObject *__pyx_n_s__LocaleTime;
static PyObject *__pyx_n_s__LooseVersion;
static PyObject *__pyx_n_s__M;
static PyObject *__pyx_n_s__M8;
static PyObject *__pyx_n_s__NAN;
static PyObject *__pyx_n_s__NAT;
static PyObject *__pyx_n_s__NaN;
static PyObject *__pyx_n_s__NaT;
static PyObject *__pyx_n_s__NaTType;
static PyObject *__pyx_n_s__NameError;
static PyObject *__pyx_n_s__None;
static PyObject *__pyx_n_s__OutOfBoundsDatetime;
static PyObject *__pyx_n_s__P;
static PyObject *__pyx_n_s__Period;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__S;
static PyObject *__pyx_n_s__S_RESO;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__T_RESO;
static PyObject *__pyx_n_s__TimeRE;
static PyObject *__pyx_n_s__Timestamp;
static PyObject *__pyx_n_s__TypeError;
static PyObject *__pyx_n_s__U;
static PyObject *__pyx_n_s__US_RESO;
static PyObject *__pyx_n_s__UTC;
static PyObject *__pyx_n_s__U_W;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s__W;
static PyObject *__pyx_n_s__X;
static PyObject *__pyx_n_s__Y;
static PyObject *__pyx_n_s__Z;
static PyObject *__pyx_n_s___CACHE_MAX_SIZE;
static PyObject *__pyx_n_s___LocaleTime__pad;
static PyObject *__pyx_n_s___TimeRE__seqToRE;
static PyObject *__pyx_n_s___TimeRE_cache;
static PyObject *__pyx_n_s____add__;
static PyObject *__pyx_n_s____all__;
static PyObject *__pyx_n_s____calc_am_pm;
static PyObject *__pyx_n_s____calc_date_time;
static PyObject *__pyx_n_s____calc_month;
static PyObject *__pyx_n_s____calc_timezone;
static PyObject *__pyx_n_s____calc_weekday;
static PyObject *__pyx_n_s____enter__;
static PyObject *__pyx_n_s____exit__;
static PyObject *__pyx_n_s____getitem__;
static PyObject *__pyx_n_s____hash__;
static PyObject *__pyx_n_s____init__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____new__;
static PyObject *__pyx_n_s____pad;
static PyObject *__pyx_n_s____reduce__;
static PyObject *__pyx_n_s____repr__;
static PyObject *__pyx_n_s____seqToRE;
static PyObject *__pyx_n_s____setitem__;
static PyObject *__pyx_n_s____setstate__;
static PyObject *__pyx_n_s____str__;
static PyObject *__pyx_n_s____sub__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___cache_lock;
static PyObject *__pyx_n_s___date_repr;
static PyObject *__pyx_n_s___du_utc;
static PyObject *__pyx_n_s___dummy_thread;
static PyObject *__pyx_n_s___get_deltas;
static PyObject *__pyx_n_s___get_field;
static PyObject *__pyx_n_s___get_transitions;
static PyObject *__pyx_n_s___getlang;
static PyObject *__pyx_n_s___has_time_component;
static PyObject *__pyx_n_s___is_fixed_offset;
static PyObject *__pyx_n_s___is_tzlocal;
static PyObject *__pyx_n_s___month_offset;
static PyObject *__pyx_n_s___nat_strings;
static PyObject *__pyx_n_s___np_version;
static PyObject *__pyx_n_s___parse_code_table;
static PyObject *__pyx_n_s___regex_cache;
static PyObject *__pyx_n_s___repr_base;
static PyObject *__pyx_n_s___thread;
static PyObject *__pyx_n_s___time_repr;
static PyObject *__pyx_n_s___transition_info;
static PyObject *__pyx_n_s___ts;
static PyObject *__pyx_n_s___tzinfos;
static PyObject *__pyx_n_s___utcoffset;
static PyObject *__pyx_n_s___zero_time;
static PyObject *__pyx_n_s__a;
static PyObject *__pyx_n_s__a_idx;
static PyObject *__pyx_n_s__a_month;
static PyObject *__pyx_n_s__a_weekday;
static PyObject *__pyx_n_s__abs;
static PyObject *__pyx_n_s__all;
static PyObject *__pyx_n_s__allocate_lock;
static PyObject *__pyx_n_s__am_pm;
static PyObject *__pyx_n_s__ampm;
static PyObject *__pyx_n_s__apply;
static PyObject *__pyx_n_s__apply_offset;
static PyObject *__pyx_n_s__args;
static PyObject *__pyx_n_s__arr;
static PyObject *__pyx_n_s__array;
static PyObject *__pyx_n_s__array_split;
static PyObject *__pyx_n_s__array_strptime;
static PyObject *__pyx_n_s__array_to_datetime;
static PyObject *__pyx_n_s__asm8;
static PyObject *__pyx_n_s__astimezone;
static PyObject *__pyx_n_s__astype;
static PyObject *__pyx_n_s__b;
static PyObject *__pyx_n_s__b_idx;
static PyObject *__pyx_n_s__bad_directive;
static PyObject *__pyx_n_s__base;
static PyObject *__pyx_n_s__base1;
static PyObject *__pyx_n_s__base2;
static PyObject *__pyx_n_s__basestring;
static PyObject *__pyx_n_s__both_eq;
static PyObject *__pyx_n_s__both_nat;
static PyObject *__pyx_n_s__boxed;
static PyObject *__pyx_n_s__build_field_sarray;
static PyObject *__pyx_n_s__c;
static PyObject *__pyx_n_s__calendar;
static PyObject *__pyx_n_s__cast_to_nanoseconds;
static PyObject *__pyx_n_s__clear;
static PyObject *__pyx_n_s__cls;
static PyObject *__pyx_n_s__code;
static PyObject *__pyx_n_s__coerce;
static PyObject *__pyx_n_s__combine;
static PyObject *__pyx_n_s__compat_NaT;
static PyObject *__pyx_n_s__compile;
static PyObject *__pyx_n_s__count;
static PyObject *__pyx_n_s__current_format;
static PyObject *__pyx_n_s__d;
static PyObject *__pyx_n_s__date;
static PyObject *__pyx_n_s__date_normalize;
static PyObject *__pyx_n_s__date_string;
static PyObject *__pyx_n_s__date_time;
static PyObject *__pyx_n_s__dates_normalized;
static PyObject *__pyx_n_s__datetime;
static PyObject *__pyx_n_s__datetime64;
static PyObject *__pyx_n_s__datetime_date;
static PyObject *__pyx_n_s__datetime_result;
static PyObject *__pyx_n_s__datetime_time;
static PyObject *__pyx_n_s__day;
static PyObject *__pyx_n_s__day_abbr;
static PyObject *__pyx_n_s__day_name;
static PyObject *__pyx_n_s__day_of_week;
static PyObject *__pyx_n_s__dayfirst;
static PyObject *__pyx_n_s__daylight;
static PyObject *__pyx_n_s__dayofweek;
static PyObject *__pyx_n_s__dayofyear;
static PyObject *__pyx_n_s__days;
static PyObject *__pyx_n_s__days_to_week;
static PyObject *__pyx_n_s__decode;
static PyObject *__pyx_n_s__delta;
static PyObject *__pyx_n_s__deltas;
static PyObject *__pyx_n_s__diff;
static PyObject *__pyx_n_s__directive;
static PyObject *__pyx_n_s__directive_index;
static PyObject *__pyx_n_s__dow;
static PyObject *__pyx_n_s__doy;
static PyObject *__pyx_n_s__dst_hours;
static PyObject *__pyx_n_s__dt;
static PyObject *__pyx_n_s__dtarr;
static PyObject *__pyx_n_s__dtindex;
static PyObject *__pyx_n_s__dts;
static PyObject *__pyx_n_s__dtype;
static PyObject *__pyx_n_s__dummy_thread;
static PyObject *__pyx_n_s__empty;
static PyObject *__pyx_n_s__encode;
static PyObject *__pyx_n_s__end;
static PyObject *__pyx_n_s__enumerate;
static PyObject *__pyx_n_s__err;
static PyObject *__pyx_n_s__escape;
static PyObject *__pyx_n_s__extend;
static PyObject *__pyx_n_s__extract_ordinals;
static PyObject *__pyx_n_s__f;
static PyObject *__pyx_n_s__f_month;
static PyObject *__pyx_n_s__f_weekday;
static PyObject *__pyx_n_s__fget;
static PyObject *__pyx_n_s__field;
static PyObject *__pyx_n_s__fields;
static PyObject *__pyx_n_s__fill;
static PyObject *__pyx_n_s__finfo;
static PyObject *__pyx_n_s__first_weekday;
static PyObject *__pyx_n_s__flat;
static PyObject *__pyx_n_s__fmt;
static PyObject *__pyx_n_s__format;
static PyObject *__pyx_n_s__format_regex;
static PyObject *__pyx_n_s__found;
static PyObject *__pyx_n_s__found_dict;
static PyObject *__pyx_n_s__found_zone;
static PyObject *__pyx_n_s__frac;
static PyObject *__pyx_n_s__fraction;
static PyObject *__pyx_n_s__freq;
static PyObject *__pyx_n_s__freq1;
static PyObject *__pyx_n_s__freq2;
static PyObject *__pyx_n_s__freq_group;
static PyObject *__pyx_n_s__freqstr;
static PyObject *__pyx_n_s__fromordinal;
static PyObject *__pyx_n_s__front;
static PyObject *__pyx_n_s__func;
static PyObject *__pyx_n_s__genexpr;
static PyObject *__pyx_n_s__get;
static PyObject *__pyx_n_s__get_date_field;
static PyObject *__pyx_n_s__get_period_field;
static PyObject *__pyx_n_s__get_time_micros;
static PyObject *__pyx_n_s__get_timezone;
static PyObject *__pyx_n_s__getlocale;
static PyObject *__pyx_n_s__gmt;
static PyObject *__pyx_n_s__group_key;
static PyObject *__pyx_n_s__groupdict;
static PyObject *__pyx_n_s__grp;
static PyObject *__pyx_n_s__h;
static PyObject *__pyx_n_s__has_saving;
static PyObject *__pyx_n_s__have_pytz;
static PyObject *__pyx_n_s__hour;
static PyObject *__pyx_n_s__hours;
static PyObject *__pyx_n_s__hstack;
static PyObject *__pyx_n_s__i;
static PyObject *__pyx_n_s__i4;
static PyObject *__pyx_n_s__i8;
static PyObject *__pyx_n_s__i8_to_pydt;
static PyObject *__pyx_n_s__iNaT;
static PyObject *__pyx_n_s__idx;
static PyObject *__pyx_n_s__idx_shifted;
static PyObject *__pyx_n_s__ignore;
static PyObject *__pyx_n_s__index;
static PyObject *__pyx_n_s__inf;
static PyObject *__pyx_n_s__infer_dst;
static PyObject *__pyx_n_s__inferred_tz;
static PyObject *__pyx_n_s__insert;
static PyObject *__pyx_n_s__int32;
static PyObject *__pyx_n_s__int64;
static PyObject *__pyx_n_s__ints_to_pydatetime;
static PyObject *__pyx_n_s__iresult;
static PyObject *__pyx_n_s__is_timestamp_array;
static PyObject *__pyx_n_s__isleap;
static PyObject *__pyx_n_s__isleap_prev;
static PyObject *__pyx_n_s__isleapyear;
static PyObject *__pyx_n_s__isoformat;
static PyObject *__pyx_n_s__item;
static PyObject *__pyx_n_s__iterkeys;
static PyObject *__pyx_n_s__ivalue;
static PyObject *__pyx_n_s__ivalues;
static PyObject *__pyx_n_s__j;
static PyObject *__pyx_n_s__join;
static PyObject *__pyx_n_s__julian;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__key;
static PyObject *__pyx_n_s__kwargs;
static PyObject *__pyx_n_s__kwds;
static PyObject *__pyx_n_s__l;
static PyObject *__pyx_n_s__lang;
static PyObject *__pyx_n_s__left;
static PyObject *__pyx_n_s__len;
static PyObject *__pyx_n_s__loc;
static PyObject *__pyx_n_s__locale;
static PyObject *__pyx_n_s__locale_time;
static PyObject *__pyx_n_s__localize;
static PyObject *__pyx_n_s__logical_and;
static PyObject *__pyx_n_s__long;
static PyObject *__pyx_n_s__lower;
static PyObject *__pyx_n_s__m;
static PyObject *__pyx_n_s__match;
static PyObject *__pyx_n_s__max;
static PyObject *__pyx_n_s__maximum;
static PyObject *__pyx_n_s__micros;
static PyObject *__pyx_n_s__microsecond;
static PyObject *__pyx_n_s__microseconds;
static PyObject *__pyx_n_s__min;
static PyObject *__pyx_n_s__minute;
static PyObject *__pyx_n_s__minutes;
static PyObject *__pyx_n_s__mo_off;
static PyObject *__pyx_n_s__month;
static PyObject *__pyx_n_s__month_abbr;
static PyObject *__pyx_n_s__month_name;
static PyObject *__pyx_n_s__monthrange;
static PyObject *__pyx_n_s__months;
static PyObject *__pyx_n_s__ms;
static PyObject *__pyx_n_s__mus;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__nan;
static PyObject *__pyx_n_s__nanos;
static PyObject *__pyx_n_s__nanosecond;
static PyObject *__pyx_n_s__nat;
static PyObject *__pyx_n_s__ndim;
static PyObject *__pyx_n_s__new;
static PyObject *__pyx_n_s__new_values;
static PyObject *__pyx_n_s__no_saving;
static PyObject *__pyx_n_s__nonzero;
static PyObject *__pyx_n_s__normalize;
static PyObject *__pyx_n_s__now;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_s__np_NaT;
static PyObject *__pyx_n_s__ns;
static PyObject *__pyx_n_s__ntrans;
static PyObject *__pyx_n_s__num;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__object;
static PyObject *__pyx_n_s__object_state;
static PyObject *__pyx_n_s__offset;
static PyObject *__pyx_n_s__old;
static PyObject *__pyx_n_s__one_diff;
static PyObject *__pyx_n_s__ordinal;
static PyObject *__pyx_n_s__ordinals;
static PyObject *__pyx_n_s__oresult;
static PyObject *__pyx_n_s__out;
static PyObject *__pyx_n_s__p;
static PyObject *__pyx_n_s__parse_code;
static PyObject *__pyx_n_s__parse_date;
static PyObject *__pyx_n_s__pattern;
static PyObject *__pyx_n_s__period_asfreq_arr;
static PyObject *__pyx_n_s__period_format;
static PyObject *__pyx_n_s__period_ordinal;
static PyObject *__pyx_n_s__periodarr;
static PyObject *__pyx_n_s__pos;
static PyObject *__pyx_n_s__processed_format;
static PyObject *__pyx_n_s__prop;
static PyObject *__pyx_n_s__property;
static PyObject *__pyx_n_s__ps;
static PyObject *__pyx_n_s__pydt;
static PyObject *__pyx_n_s__pydt_to_i8;
static PyObject *__pyx_n_s__pytz;
static PyObject *__pyx_n_s__q;
static PyObject *__pyx_n_s__quarter;
static PyObject *__pyx_n_s__raise_;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__ravel;
static PyObject *__pyx_n_s__re;
static PyObject *__pyx_n_s__re_compile;
static PyObject *__pyx_n_s__re_escape;
static PyObject *__pyx_n_s__regex;
static PyObject *__pyx_n_s__regex_chars;
static PyObject *__pyx_n_s__relation;
static PyObject *__pyx_n_s__replace;
static PyObject *__pyx_n_s__replacement_pairs;
static PyObject *__pyx_n_s__repr_timedelta64;
static PyObject *__pyx_n_s__result;
static PyObject *__pyx_n_s__result_a;
static PyObject *__pyx_n_s__result_b;
static PyObject *__pyx_n_s__ret;
static PyObject *__pyx_n_s__reverse;
static PyObject *__pyx_n_s__right;
static PyObject *__pyx_n_s__round;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__sa_dtype;
static PyObject *__pyx_n_s__searchsorted;
static PyObject *__pyx_n_s__second;
static PyObject *__pyx_n_s__seconds;
static PyObject *__pyx_n_s__seconds_pretty;
static PyObject *__pyx_n_s__seen_datetime;
static PyObject *__pyx_n_s__seen_integer;
static PyObject *__pyx_n_s__self;
static PyObject *__pyx_n_s__sep;
static PyObject *__pyx_n_s__seq;
static PyObject *__pyx_n_s__shape;
static PyObject *__pyx_n_s__short;
static PyObject *__pyx_n_s__short_version;
static PyObject *__pyx_n_s__side;
static PyObject *__pyx_n_s__sign;
static PyObject *__pyx_n_s__sign_pretty;
static PyObject *__pyx_n_s__size;
static PyObject *__pyx_n_s__sort;
static PyObject *__pyx_n_s__sorted;
static PyObject *__pyx_n_s__sp;
static PyObject *__pyx_n_s__squeeze;
static PyObject *__pyx_n_s__stamp;
static PyObject *__pyx_n_s__stamps;
static PyObject *__pyx_n_s__startswith;
static PyObject *__pyx_n_s__state;
static PyObject *__pyx_n_s__strftime;
static PyObject *__pyx_n_s__struct_time;
static PyObject *__pyx_n_s__sub;
static PyObject *__pyx_n_s__super;
static PyObject *__pyx_n_s__switch_idx;
static PyObject *__pyx_n_s__sys;
static PyObject *__pyx_n_s__sz;
static PyObject *__pyx_n_s__t;
static PyObject *__pyx_n_s__table;
static PyObject *__pyx_n_s__td;
static PyObject *__pyx_n_s__tdata;
static PyObject *__pyx_n_s__thread;
static PyObject *__pyx_n_s__time;
static PyObject *__pyx_n_s__time_tuple;
static PyObject *__pyx_n_s__timedelta;
static PyObject *__pyx_n_s__timedelta64;
static PyObject *__pyx_n_s__timezone;
static PyObject *__pyx_n_s__to_convert;
static PyObject *__pyx_n_s__to_datetime;
static PyObject *__pyx_n_s__to_period;
static PyObject *__pyx_n_s__to_pydatetime;
static PyObject *__pyx_n_s__today;
static PyObject *__pyx_n_s__toordinal;
static PyObject *__pyx_n_s__tot_seconds;
static PyObject *__pyx_n_s__total_seconds;
static PyObject *__pyx_n_s__trans;
static PyObject *__pyx_n_s__trans_cache;
static PyObject *__pyx_n_s__trans_grp;
static PyObject *__pyx_n_s__trans_idx;
static PyObject *__pyx_n_s__trans_len;
static PyObject *__pyx_n_s__ts;
static PyObject *__pyx_n_s__ts_base;
static PyObject *__pyx_n_s__ts_input;
static PyObject *__pyx_n_s__tso;
static PyObject *__pyx_n_s__tz;
static PyObject *__pyx_n_s__tz1;
static PyObject *__pyx_n_s__tz2;
static PyObject *__pyx_n_s__tz_convert;
static PyObject *__pyx_n_s__tz_convert_single;
static PyObject *__pyx_n_s__tz_localize;
static PyObject *__pyx_n_s__tz_localize_to_utc;
static PyObject *__pyx_n_s__tz_values;
static PyObject *__pyx_n_s__tzinfo;
static PyObject *__pyx_n_s__tzlocal;
static PyObject *__pyx_n_s__tzname;
static PyObject *__pyx_n_s__tzset;
static PyObject *__pyx_n_s__tzutc;
static PyObject *__pyx_n_s__u;
static PyObject *__pyx_n_s__unique_deltas;
static PyObject *__pyx_n_s__uniques;
static PyObject *__pyx_n_s__unit;
static PyObject *__pyx_n_s__us;
static PyObject *__pyx_n_s__utc;
static PyObject *__pyx_n_s__utc_convert;
static PyObject *__pyx_n_s__utc_date;
static PyObject *__pyx_n_s__utc_dates;
static PyObject *__pyx_n_s__utc_offset_cache;
static PyObject *__pyx_n_s__utcnow;
static PyObject *__pyx_n_s__utcoffset;
static PyObject *__pyx_n_s__v;
static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__vals;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__version;
static PyObject *__pyx_n_s__version_info;
static PyObject *__pyx_n_s__view;
static PyObject *__pyx_n_s__w;
static PyObject *__pyx_n_s__warn;
static PyObject *__pyx_n_s__week;
static PyObject *__pyx_n_s__week_0_length;
static PyObject *__pyx_n_s__week_of_year;
static PyObject *__pyx_n_s__week_of_year_start;
static PyObject *__pyx_n_s__week_starts_Mon;
static PyObject *__pyx_n_s__weekday;
static PyObject *__pyx_n_s__weekofyear;
static PyObject *__pyx_n_s__where;
static PyObject *__pyx_n_s__woy;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__y;
static PyObject *__pyx_n_s__year;
static PyObject *__pyx_n_s__year2000;
static PyObject *__pyx_n_s__years;
static PyObject *__pyx_n_s__zone;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_1L;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_9;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_01;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_11;
static PyObject *__pyx_int_12;
static PyObject *__pyx_int_13;
static PyObject *__pyx_int_14;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_16;
static PyObject *__pyx_int_17;
static PyObject *__pyx_int_18;
static PyObject *__pyx_int_22;
static PyObject *__pyx_int_24;
static PyObject *__pyx_int_31;
static PyObject *__pyx_int_44;
static PyObject *__pyx_int_55;
static PyObject *__pyx_int_59;
static PyObject *__pyx_int_60;
static PyObject *__pyx_int_76;
static PyObject *__pyx_int_90;
static PyObject *__pyx_int_91;
static PyObject *__pyx_int_120;
static PyObject *__pyx_int_121;
static PyObject *__pyx_int_151;
static PyObject *__pyx_int_152;
static PyObject *__pyx_int_181;
static PyObject *__pyx_int_182;
static PyObject *__pyx_int_212;
static PyObject *__pyx_int_213;
static PyObject *__pyx_int_243;
static PyObject *__pyx_int_244;
static PyObject *__pyx_int_273;
static PyObject *__pyx_int_274;
static PyObject *__pyx_int_304;
static PyObject *__pyx_int_305;
static PyObject *__pyx_int_334;
static PyObject *__pyx_int_335;
static PyObject *__pyx_int_365;
static PyObject *__pyx_int_366;
static PyObject *__pyx_int_1000;
static PyObject *__pyx_int_1000L;
static PyObject *__pyx_int_1999;
static PyObject *__pyx_int_2000;
static PyObject *__pyx_int_3600;
static PyObject *__pyx_int_6000;
static PyObject *__pyx_int_86400;
static PyObject *__pyx_int_1000000;
static PyObject *__pyx_int_1000000L;
static PyObject *__pyx_int_1000000000;
static PyObject *__pyx_int_1000000000L;
static PyObject *__pyx_int_86400000000000L;
static PyObject *__pyx_k_56;
static PyObject *__pyx_k_57;
static PyObject *__pyx_k_58;
static PyObject *__pyx_k_65;
static PyObject *__pyx_k_68;
static PyObject *__pyx_k_82;
static PyObject *__pyx_k_tuple_1;
static PyObject *__pyx_k_tuple_3;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_6;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_tuple_16;
static PyObject *__pyx_k_tuple_17;
static PyObject *__pyx_k_tuple_19;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_30;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_34;
static PyObject *__pyx_k_tuple_35;
static PyObject *__pyx_k_tuple_37;
static PyObject *__pyx_k_tuple_39;
static PyObject *__pyx_k_tuple_41;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_47;
static PyObject *__pyx_k_tuple_49;
static PyObject *__pyx_k_tuple_51;
static PyObject *__pyx_k_tuple_55;
static PyObject *__pyx_k_tuple_59;
static PyObject *__pyx_k_tuple_61;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_67;
static PyObject *__pyx_k_tuple_69;
static PyObject *__pyx_k_tuple_71;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_75;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_91;
static PyObject *__pyx_k_tuple_94;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_97;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_100;
static PyObject *__pyx_k_tuple_102;
static PyObject *__pyx_k_tuple_104;
static PyObject *__pyx_k_tuple_109;
static PyObject *__pyx_k_tuple_110;
static PyObject *__pyx_k_tuple_111;
static PyObject *__pyx_k_tuple_112;
static PyObject *__pyx_k_tuple_113;
static PyObject *__pyx_k_tuple_114;
static PyObject *__pyx_k_tuple_115;
static PyObject *__pyx_k_tuple_118;
static PyObject *__pyx_k_tuple_120;
static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_124;
static PyObject *__pyx_k_tuple_138;
static PyObject *__pyx_k_tuple_140;
static PyObject *__pyx_k_tuple_146;
static PyObject *__pyx_k_tuple_155;
static PyObject *__pyx_k_tuple_156;
static PyObject *__pyx_k_tuple_157;
static PyObject *__pyx_k_tuple_159;
static PyObject *__pyx_k_tuple_160;
static PyObject *__pyx_k_tuple_165;
static PyObject *__pyx_k_tuple_170;
static PyObject *__pyx_k_tuple_172;
static PyObject *__pyx_k_tuple_174;
static PyObject *__pyx_k_tuple_176;
static PyObject *__pyx_k_tuple_178;
static PyObject *__pyx_k_tuple_180;
static PyObject *__pyx_k_tuple_181;
static PyObject *__pyx_k_tuple_183;
static PyObject *__pyx_k_tuple_184;
static PyObject *__pyx_k_tuple_186;
static PyObject *__pyx_k_tuple_188;
static PyObject *__pyx_k_tuple_190;
static PyObject *__pyx_k_tuple_191;
static PyObject *__pyx_k_tuple_192;
static PyObject *__pyx_k_tuple_193;
static PyObject *__pyx_k_tuple_194;
static PyObject *__pyx_k_tuple_195;
static PyObject *__pyx_k_tuple_210;
static PyObject *__pyx_k_tuple_211;
static PyObject *__pyx_k_tuple_216;
static PyObject *__pyx_k_tuple_219;
static PyObject *__pyx_k_tuple_220;
static PyObject *__pyx_k_tuple_225;
static PyObject *__pyx_k_tuple_227;
static PyObject *__pyx_k_tuple_229;
static PyObject *__pyx_k_tuple_232;
static PyObject *__pyx_k_tuple_233;
static PyObject *__pyx_k_tuple_235;
static PyObject *__pyx_k_tuple_236;
static PyObject *__pyx_k_tuple_237;
static PyObject *__pyx_k_tuple_243;
static PyObject *__pyx_k_tuple_244;
static PyObject *__pyx_k_tuple_245;
static PyObject *__pyx_k_tuple_250;
static PyObject *__pyx_k_tuple_252;
static PyObject *__pyx_k_tuple_254;
static PyObject *__pyx_k_tuple_255;
static PyObject *__pyx_k_tuple_257;
static PyObject *__pyx_k_tuple_258;
static PyObject *__pyx_k_tuple_260;
static PyObject *__pyx_k_tuple_261;
static PyObject *__pyx_k_tuple_263;
static PyObject *__pyx_k_tuple_265;
static PyObject *__pyx_k_tuple_267;
static PyObject *__pyx_k_tuple_268;
static PyObject *__pyx_k_tuple_270;
static PyObject *__pyx_k_tuple_272;
static PyObject *__pyx_k_tuple_274;
static PyObject *__pyx_k_tuple_276;
static PyObject *__pyx_k_tuple_278;
static PyObject *__pyx_k_tuple_280;
static PyObject *__pyx_k_tuple_282;
static PyObject *__pyx_k_tuple_284;
static PyObject *__pyx_k_tuple_286;
static PyObject *__pyx_k_tuple_287;
static PyObject *__pyx_k_tuple_289;
static PyObject *__pyx_k_tuple_291;
static PyObject *__pyx_k_tuple_293;
static PyObject *__pyx_k_tuple_295;
static PyObject *__pyx_k_tuple_297;
static PyObject *__pyx_k_tuple_299;
static PyObject *__pyx_k_tuple_301;
static PyObject *__pyx_k_tuple_303;
static PyObject *__pyx_k_tuple_305;
static PyObject *__pyx_k_tuple_307;
static PyObject *__pyx_k_tuple_309;
static PyObject *__pyx_k_tuple_310;
static PyObject *__pyx_k_tuple_313;
static PyObject *__pyx_k_tuple_315;
static PyObject *__pyx_k_tuple_317;
static PyObject *__pyx_k_tuple_319;
static PyObject *__pyx_k_tuple_321;
static PyObject *__pyx_k_tuple_323;
static PyObject *__pyx_k_tuple_326;
static PyObject *__pyx_k_tuple_328;
static PyObject *__pyx_k_tuple_330;
static PyObject *__pyx_k_tuple_332;
static PyObject *__pyx_k_tuple_334;
static PyObject *__pyx_k_tuple_336;
static PyObject *__pyx_k_tuple_339;
static PyObject *__pyx_k_tuple_341;
static PyObject *__pyx_k_tuple_343;
static PyObject *__pyx_k_tuple_345;
static PyObject *__pyx_k_tuple_348;
static PyObject *__pyx_k_tuple_351;
static PyObject *__pyx_k_tuple_353;
static PyObject *__pyx_k_tuple_355;
static PyObject *__pyx_k_tuple_357;
static PyObject *__pyx_k_tuple_359;
static PyObject *__pyx_k_tuple_361;
static PyObject *__pyx_k_tuple_363;
static PyObject *__pyx_k_tuple_365;
static PyObject *__pyx_k_tuple_367;
static PyObject *__pyx_k_tuple_369;
static PyObject *__pyx_k_tuple_371;
static PyObject *__pyx_k_tuple_373;
static PyObject *__pyx_k_tuple_375;
static PyObject *__pyx_k_tuple_377;
static PyObject *__pyx_k_tuple_379;
static PyObject *__pyx_k_tuple_381;
static PyObject *__pyx_k_tuple_383;
static PyObject *__pyx_k_tuple_385;
static PyObject *__pyx_k_tuple_387;
static PyObject *__pyx_k_tuple_390;
static PyObject *__pyx_k_tuple_393;
static PyObject *__pyx_k_tuple_395;
static PyObject *__pyx_k_tuple_397;
static PyObject *__pyx_k_tuple_401;
static PyObject *__pyx_k_tuple_404;
static PyObject *__pyx_k_tuple_407;
static PyObject *__pyx_k_tuple_410;
static PyObject *__pyx_k_tuple_413;
static PyObject *__pyx_k_tuple_416;
static PyObject *__pyx_k_tuple_417;
static PyObject *__pyx_k_tuple_419;
static PyObject *__pyx_k_tuple_422;
static PyObject *__pyx_k_tuple_426;
static PyObject *__pyx_k_tuple_428;
static PyObject *__pyx_k_tuple_430;
static PyObject *__pyx_k_tuple_432;
static PyObject *__pyx_k_tuple_434;
static PyObject *__pyx_k_tuple_436;
static PyObject *__pyx_k_tuple_438;
static PyObject *__pyx_k_tuple_441;
static PyObject *__pyx_k_tuple_443;
static PyObject *__pyx_k_tuple_444;
static PyObject *__pyx_k_tuple_447;
static PyObject *__pyx_k_tuple_449;
static PyObject *__pyx_k_tuple_452;
static PyObject *__pyx_k_codeobj_246;
static PyObject *__pyx_k_codeobj_251;
static PyObject *__pyx_k_codeobj_253;
static PyObject *__pyx_k_codeobj_256;
static PyObject *__pyx_k_codeobj_259;
static PyObject *__pyx_k_codeobj_262;
static PyObject *__pyx_k_codeobj_264;
static PyObject *__pyx_k_codeobj_266;
static PyObject *__pyx_k_codeobj_269;
static PyObject *__pyx_k_codeobj_271;
static PyObject *__pyx_k_codeobj_273;
static PyObject *__pyx_k_codeobj_275;
static PyObject *__pyx_k_codeobj_277;
static PyObject *__pyx_k_codeobj_279;
static PyObject *__pyx_k_codeobj_281;
static PyObject *__pyx_k_codeobj_283;
static PyObject *__pyx_k_codeobj_285;
static PyObject *__pyx_k_codeobj_288;
static PyObject *__pyx_k_codeobj_290;
static PyObject *__pyx_k_codeobj_292;
static PyObject *__pyx_k_codeobj_294;
static PyObject *__pyx_k_codeobj_296;
static PyObject *__pyx_k_codeobj_298;
static PyObject *__pyx_k_codeobj_300;
static PyObject *__pyx_k_codeobj_302;
static PyObject *__pyx_k_codeobj_304;
static PyObject *__pyx_k_codeobj_306;
static PyObject *__pyx_k_codeobj_308;
static PyObject *__pyx_k_codeobj_311;
static PyObject *__pyx_k_codeobj_314;
static PyObject *__pyx_k_codeobj_316;
static PyObject *__pyx_k_codeobj_318;
static PyObject *__pyx_k_codeobj_320;
static PyObject *__pyx_k_codeobj_322;
static PyObject *__pyx_k_codeobj_324;
static PyObject *__pyx_k_codeobj_327;
static PyObject *__pyx_k_codeobj_329;
static PyObject *__pyx_k_codeobj_331;
static PyObject *__pyx_k_codeobj_333;
static PyObject *__pyx_k_codeobj_335;
static PyObject *__pyx_k_codeobj_337;
static PyObject *__pyx_k_codeobj_340;
static PyObject *__pyx_k_codeobj_342;
static PyObject *__pyx_k_codeobj_344;
static PyObject *__pyx_k_codeobj_346;
static PyObject *__pyx_k_codeobj_349;
static PyObject *__pyx_k_codeobj_352;
static PyObject *__pyx_k_codeobj_354;
static PyObject *__pyx_k_codeobj_356;
static PyObject *__pyx_k_codeobj_358;
static PyObject *__pyx_k_codeobj_360;
static PyObject *__pyx_k_codeobj_362;
static PyObject *__pyx_k_codeobj_364;
static PyObject *__pyx_k_codeobj_366;
static PyObject *__pyx_k_codeobj_368;
static PyObject *__pyx_k_codeobj_370;
static PyObject *__pyx_k_codeobj_372;
static PyObject *__pyx_k_codeobj_374;
static PyObject *__pyx_k_codeobj_376;
static PyObject *__pyx_k_codeobj_378;
static PyObject *__pyx_k_codeobj_380;
static PyObject *__pyx_k_codeobj_382;
static PyObject *__pyx_k_codeobj_384;
static PyObject *__pyx_k_codeobj_386;
static PyObject *__pyx_k_codeobj_388;
static PyObject *__pyx_k_codeobj_391;
static PyObject *__pyx_k_codeobj_394;
static PyObject *__pyx_k_codeobj_396;
static PyObject *__pyx_k_codeobj_398;
static PyObject *__pyx_k_codeobj_418;
static PyObject *__pyx_k_codeobj_420;
static PyObject *__pyx_k_codeobj_423;
static PyObject *__pyx_k_codeobj_425;
static PyObject *__pyx_k_codeobj_427;
static PyObject *__pyx_k_codeobj_429;
static PyObject *__pyx_k_codeobj_431;
static PyObject *__pyx_k_codeobj_433;
static PyObject *__pyx_k_codeobj_435;
static PyObject *__pyx_k_codeobj_437;
static PyObject *__pyx_k_codeobj_439;
static PyObject *__pyx_k_codeobj_442;
static PyObject *__pyx_k_codeobj_445;
static PyObject *__pyx_k_codeobj_448;
static PyObject *__pyx_k_codeobj_450;
static PyObject *__pyx_k_codeobj_453;

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_100lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_100lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_5tslib_100lambda1, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_100lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_6pandas_5tslib_lambda1(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":420
 *           'week', 'dayofyear']
 * for field in fields:
 *     prop = property(fget=lambda self: -1)             # <<<<<<<<<<<<<<
 *     setattr(NaTType, field, prop)
 * 
 */

static PyObject *__pyx_lambda_funcdef_6pandas_5tslib_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_r = __pyx_int_neg_1;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_1ints_to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_1ints_to_pydatetime = {__Pyx_NAMESTR("ints_to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_1ints_to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_1ints_to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ints_to_pydatetime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__tz,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":73
 *     basestring = str
 * 
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ints_to_pydatetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __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_arr = ((PyArrayObject *)values[0]);
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ints_to_pydatetime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.ints_to_pydatetime", __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[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_ints_to_pydatetime(__pyx_self, __pyx_v_arr, __pyx_v_tz);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_ints_to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_tz) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  pandas_datetimestruct __pyx_v_dts;
  PyArrayObject *__pyx_v_result = 0;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_trans = NULL;
  PyObject *__pyx_v_deltas = NULL;
  PyObject *__pyx_v_pos = NULL;
  PyObject *__pyx_v_inf = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject **__pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  npy_datetime __pyx_t_29;
  PyObject *__pyx_t_30 = NULL;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ints_to_pydatetime", 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[0]; __pyx_lineno = 73; __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/tslib.pyx":75
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):
 *     cdef:
 *         Py_ssize_t i, n = len(arr)             # <<<<<<<<<<<<<<
 *         pandas_datetimestruct dts
 *         ndarray[object] 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[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":77
 *         Py_ssize_t i, n = len(arr)
 *         pandas_datetimestruct dts
 *         ndarray[object] result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __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[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":79
 *         ndarray[object] result = np.empty(n, dtype=object)
 * 
 *     if tz is not None:             # <<<<<<<<<<<<<<
 *         if _is_utc(tz):
 *             for i in range(n):
 */
  __pyx_t_7 = (__pyx_v_tz != Py_None);
  if (__pyx_t_7) {

    /* "pandas/tslib.pyx":80
 * 
 *     if tz is not None:
 *         if _is_utc(tz):             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 if arr[i] == iNaT:
 */
    __pyx_t_7 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":81
 *     if tz is not None:
 *         if _is_utc(tz):
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if arr[i] == iNaT:
 *                     result[i] = np.nan
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

        /* "pandas/tslib.pyx":82
 *         if _is_utc(tz):
 *             for i in range(n):
 *                 if arr[i] == iNaT:             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
        __pyx_t_9 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_9 < 0) {
          __pyx_t_9 += __pyx_pybuffernd_arr.diminfo[0].shape;
          if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_7) {

          /* "pandas/tslib.pyx":83
 *             for i in range(n):
 *                 if arr[i] == iNaT:
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 */
          __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_11 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_11 < 0) {
            __pyx_t_11 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_11 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_12);
          __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_12);
          *__pyx_t_12 = __pyx_t_2;
          __Pyx_GIVEREF(*__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":85
 *                     result[i] = np.nan
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                          dts.min, dts.sec, dts.us, tz)
 */
          __pyx_t_13 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_13 < 0) {
            __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

          /* "pandas/tslib.pyx":86
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                          dts.min, dts.sec, dts.us, tz)
 *         elif _is_tzlocal(tz) or _is_fixed_offset(tz):
 */
          __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);

          /* "pandas/tslib.pyx":87
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                          dts.min, dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *         elif _is_tzlocal(tz) or _is_fixed_offset(tz):
 *             for i in range(n):
 */
          __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_17 = PyTuple_New(8); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_16);
          __Pyx_INCREF(__pyx_v_tz);
          PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_v_tz);
          __Pyx_GIVEREF(__pyx_v_tz);
          __pyx_t_2 = 0;
          __pyx_t_4 = 0;
          __pyx_t_5 = 0;
          __pyx_t_3 = 0;
          __pyx_t_14 = 0;
          __pyx_t_15 = 0;
          __pyx_t_16 = 0;
          __pyx_t_16 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;

          /* "pandas/tslib.pyx":86
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                          dts.min, dts.sec, dts.us, tz)
 *         elif _is_tzlocal(tz) or _is_fixed_offset(tz):
 */
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_12);
          __Pyx_INCREF(__pyx_t_16); __Pyx_DECREF(*__pyx_t_12);
          *__pyx_t_12 = __pyx_t_16;
          __Pyx_GIVEREF(*__pyx_t_12);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __pyx_L7:;
      }
      goto __pyx_L4;
    }

    /* "pandas/tslib.pyx":88
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                          dts.min, dts.sec, dts.us, tz)
 *         elif _is_tzlocal(tz) or _is_fixed_offset(tz):             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 if arr[i] == iNaT:
 */
    __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_15 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (!__pyx_t_7) {
      __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_fixed_offset); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_16 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_20 = __pyx_t_19;
    } else {
      __pyx_t_20 = __pyx_t_7;
    }
    if (__pyx_t_20) {

      /* "pandas/tslib.pyx":89
 *                                          dts.min, dts.sec, dts.us, tz)
 *         elif _is_tzlocal(tz) or _is_fixed_offset(tz):
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if arr[i] == iNaT:
 *                     result[i] = np.nan
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

        /* "pandas/tslib.pyx":90
 *         elif _is_tzlocal(tz) or _is_fixed_offset(tz):
 *             for i in range(n):
 *                 if arr[i] == iNaT:             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_21 += __pyx_pybuffernd_arr.diminfo[0].shape;
          if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_15 = PyObject_RichCompare(__pyx_t_16, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (__pyx_t_20) {

          /* "pandas/tslib.pyx":91
 *             for i in range(n):
 *                 if arr[i] == iNaT:
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 */
          __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_17 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__nan); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_22 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_22 < 0) {
            __pyx_t_22 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_22 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_12);
          __Pyx_INCREF(__pyx_t_17); __Pyx_DECREF(*__pyx_t_12);
          *__pyx_t_12 = __pyx_t_17;
          __Pyx_GIVEREF(*__pyx_t_12);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          goto __pyx_L10;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":93
 *                     result[i] = np.nan
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                     dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                   dts.min, dts.sec, dts.us, tz)
 */
          __pyx_t_23 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_23 < 0) {
            __pyx_t_23 += __pyx_pybuffernd_arr.diminfo[0].shape;
            if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

          /* "pandas/tslib.pyx":94
 *                 else:
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                     dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                   dts.min, dts.sec, dts.us, tz)
 *                     result[i] = dt + tz.utcoffset(dt)
 */
          __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);

          /* "pandas/tslib.pyx":95
 *                     pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                     dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                   dts.min, dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *                     result[i] = dt + tz.utcoffset(dt)
 *         else:
 */
          __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
          __Pyx_GIVEREF(__pyx_t_17);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_16);
          PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_tz);
          PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_tz);
          __Pyx_GIVEREF(__pyx_v_tz);
          __pyx_t_17 = 0;
          __pyx_t_15 = 0;
          __pyx_t_16 = 0;
          __pyx_t_14 = 0;
          __pyx_t_3 = 0;
          __pyx_t_5 = 0;
          __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
          __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_4);
          __pyx_t_4 = 0;

          /* "pandas/tslib.pyx":96
 *                     dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                   dts.min, dts.sec, dts.us, tz)
 *                     result[i] = dt + tz.utcoffset(dt)             # <<<<<<<<<<<<<<
 *         else:
 *             trans = _get_transitions(tz)
 */
          __pyx_t_4 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s__utcoffset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(((PyObject *)__pyx_v_dt));
          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_dt));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
          __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_dt), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_24 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_24 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_12);
          __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(*__pyx_t_12);
          *__pyx_t_12 = __pyx_t_2;
          __Pyx_GIVEREF(*__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_L10:;
      }
      goto __pyx_L4;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":98
 *                     result[i] = dt + tz.utcoffset(dt)
 *         else:
 *             trans = _get_transitions(tz)             # <<<<<<<<<<<<<<
 *             deltas = _get_deltas(tz)
 *             for i in range(n):
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __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[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_v_trans = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":99
 *         else:
 *             trans = _get_transitions(tz)
 *             deltas = _get_deltas(tz)             # <<<<<<<<<<<<<<
 *             for i in range(n):
 * 
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_v_deltas = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":100
 *             trans = _get_transitions(tz)
 *             deltas = _get_deltas(tz)
 *             for i in range(n):             # <<<<<<<<<<<<<<
 * 
 *                 if arr[i] == iNaT:
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

        /* "pandas/tslib.pyx":102
 *             for i in range(n):
 * 
 *                 if arr[i] == iNaT:             # <<<<<<<<<<<<<<
 *                     result[i] = np.nan
 *                 else:
 */
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_arr.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_20) {

          /* "pandas/tslib.pyx":103
 * 
 *                 if arr[i] == iNaT:
 *                     result[i] = np.nan             # <<<<<<<<<<<<<<
 *                 else:
 * 
 */
          __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_result.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;
          goto __pyx_L13;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":107
 * 
 *                     # Adjust datetime64 timestamp, recompute datetimestruct
 *                     pos = trans.searchsorted(arr[i]) - 1             # <<<<<<<<<<<<<<
 *                     inf = tz._transition_info[pos]
 * 
 */
          __pyx_t_5 = PyObject_GetAttr(__pyx_v_trans, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_arr.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          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_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_v_pos);
          __pyx_v_pos = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "pandas/tslib.pyx":108
 *                     # Adjust datetime64 timestamp, recompute datetimestruct
 *                     pos = trans.searchsorted(arr[i]) - 1
 *                     inf = tz._transition_info[pos]             # <<<<<<<<<<<<<<
 * 
 *                     pandas_datetime_to_datetimestruct(arr[i] + deltas[pos],
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_pos); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_v_inf);
          __pyx_v_inf = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "pandas/tslib.pyx":110
 *                     inf = tz._transition_info[pos]
 * 
 *                     pandas_datetime_to_datetimestruct(arr[i] + deltas[pos],             # <<<<<<<<<<<<<<
 *                                                       PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
          __pyx_t_28 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_pybuffernd_arr.diminfo[0].shape;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_29 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_29 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pandas/tslib.pyx":111
 * 
 *                     pandas_datetime_to_datetimestruct(arr[i] + deltas[pos],
 *                                                       PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                          dts.min, dts.sec, dts.us,
 */
          pandas_datetime_to_datetimestruct(__pyx_t_29, PANDAS_FR_ns, (&__pyx_v_dts));

          /* "pandas/tslib.pyx":112
 *                     pandas_datetime_to_datetimestruct(arr[i] + deltas[pos],
 *                                                       PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                          dts.min, dts.sec, dts.us,
 *                                          tz._tzinfos[inf])
 */
          __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);

          /* "pandas/tslib.pyx":113
 *                                                       PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                          dts.min, dts.sec, dts.us,             # <<<<<<<<<<<<<<
 *                                          tz._tzinfos[inf])
 *     else:
 */
          __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);

          /* "pandas/tslib.pyx":114
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                          dts.min, dts.sec, dts.us,
 *                                          tz._tzinfos[inf])             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(n):
 */
          __pyx_t_17 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___tzinfos); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_30 = PyObject_GetItem(__pyx_t_17, __pyx_v_inf); if (!__pyx_t_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_30);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __pyx_t_17 = PyTuple_New(8); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_16);
          PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          __pyx_t_5 = 0;
          __pyx_t_2 = 0;
          __pyx_t_4 = 0;
          __pyx_t_3 = 0;
          __pyx_t_14 = 0;
          __pyx_t_16 = 0;
          __pyx_t_15 = 0;
          __pyx_t_30 = 0;
          __pyx_t_30 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_30);
          __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;

          /* "pandas/tslib.pyx":112
 *                     pandas_datetime_to_datetimestruct(arr[i] + deltas[pos],
 *                                                       PANDAS_FR_ns, &dts)
 *                     result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                          dts.min, dts.sec, dts.us,
 *                                          tz._tzinfos[inf])
 */
          __pyx_t_31 = __pyx_v_i;
          __pyx_t_10 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_12);
          __Pyx_INCREF(__pyx_t_30); __Pyx_DECREF(*__pyx_t_12);
          *__pyx_t_12 = __pyx_t_30;
          __Pyx_GIVEREF(*__pyx_t_12);
          __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        }
        __pyx_L13:;
      }
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":116
 *                                          tz._tzinfos[inf])
 *     else:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if arr[i] == iNaT:
 *                 result[i] = np.nan
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
      __pyx_v_i = __pyx_t_8;

      /* "pandas/tslib.pyx":117
 *     else:
 *         for i in range(n):
 *             if arr[i] == iNaT:             # <<<<<<<<<<<<<<
 *                 result[i] = np.nan
 *             else:
 */
      __pyx_t_32 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_32 < 0) {
        __pyx_t_32 += __pyx_pybuffernd_arr.diminfo[0].shape;
        if (unlikely(__pyx_t_32 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_30 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_arr.diminfo[0].strides))); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_30);
      __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_15 = PyObject_RichCompare(__pyx_t_30, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_20 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_20 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (__pyx_t_20) {

        /* "pandas/tslib.pyx":118
 *         for i in range(n):
 *             if arr[i] == iNaT:
 *                 result[i] = np.nan             # <<<<<<<<<<<<<<
 *             else:
 *                 pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 */
        __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_17 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__nan); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_33 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_33 < 0) {
          __pyx_t_33 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_33 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_12);
        __Pyx_INCREF(__pyx_t_17); __Pyx_DECREF(*__pyx_t_12);
        *__pyx_t_12 = __pyx_t_17;
        __Pyx_GIVEREF(*__pyx_t_12);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        goto __pyx_L16;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":120
 *                 result[i] = np.nan
 *             else:
 *                 pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                      dts.min, dts.sec, dts.us)
 */
        __pyx_t_34 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_34 < 0) {
          __pyx_t_34 += __pyx_pybuffernd_arr.diminfo[0].shape;
          if (unlikely(__pyx_t_34 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_arr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":121
 *             else:
 *                 pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                 result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                      dts.min, dts.sec, dts.us)
 * 
 */
        __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_30 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_30);
        __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_16);

        /* "pandas/tslib.pyx":122
 *                 pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                 result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                                      dts.min, dts.sec, dts.us)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_30);
        __Pyx_GIVEREF(__pyx_t_30);
        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_17 = 0;
        __pyx_t_15 = 0;
        __pyx_t_30 = 0;
        __pyx_t_16 = 0;
        __pyx_t_14 = 0;
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

        /* "pandas/tslib.pyx":121
 *             else:
 *                 pandas_datetime_to_datetimestruct(arr[i], PANDAS_FR_ns, &dts)
 *                 result[i] = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                      dts.min, dts.sec, dts.us)
 * 
 */
        __pyx_t_35 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_35 < 0) {
          __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_35 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_12);
        __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(*__pyx_t_12);
        *__pyx_t_12 = __pyx_t_4;
        __Pyx_GIVEREF(*__pyx_t_12);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L16:;
    }
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":124
 *                                      dts.min, dts.sec, dts.us)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * from dateutil.tz import tzlocal
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_30);
  { 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.tslib.ints_to_pydatetime", __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((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_trans);
  __Pyx_XDECREF(__pyx_v_deltas);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_v_inf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_3_is_tzlocal(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_3_is_tzlocal = {__Pyx_NAMESTR("_is_tzlocal"), (PyCFunction)__pyx_pw_6pandas_5tslib_3_is_tzlocal, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_3_is_tzlocal(PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_is_tzlocal (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_2_is_tzlocal(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":128
 * from dateutil.tz import tzlocal
 * 
 * def _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *     return isinstance(tz, tzlocal)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_2_is_tzlocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_tzlocal", 0);

  /* "pandas/tslib.pyx":129
 * 
 * def _is_tzlocal(tz):
 *     return isinstance(tz, tzlocal)             # <<<<<<<<<<<<<<
 * 
 * def _is_fixed_offset(tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tzlocal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_5_is_fixed_offset(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_5_is_fixed_offset = {__Pyx_NAMESTR("_is_fixed_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_5_is_fixed_offset, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_5_is_fixed_offset(PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_is_fixed_offset (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_4_is_fixed_offset(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":131
 *     return isinstance(tz, tzlocal)
 * 
 * def _is_fixed_offset(tz):             # <<<<<<<<<<<<<<
 *     try:
 *         tz._transition_info
 */

static PyObject *__pyx_pf_6pandas_5tslib_4_is_fixed_offset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_fixed_offset", 0);

  /* "pandas/tslib.pyx":132
 * 
 * def _is_fixed_offset(tz):
 *     try:             # <<<<<<<<<<<<<<
 *         tz._transition_info
 *         return False
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/tslib.pyx":133
 * def _is_fixed_offset(tz):
 *     try:
 *         tz._transition_info             # <<<<<<<<<<<<<<
 *         return False
 *     except AttributeError:
 */
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":134
 *     try:
 *         tz._transition_info
 *         return False             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":135
 *         tz._transition_info
 *         return False
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pandas.tslib._is_fixed_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "pandas/tslib.pyx":136
 *         return False
 *     except AttributeError:
 *         return True             # <<<<<<<<<<<<<<
 * 
 * _zero_time = datetime_time(0, 0)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas.tslib._is_fixed_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_fromordinal[] = " passed an ordinal, translate and convert to a ts\n            note: by definition there cannot be any tz info on the ordinal itself ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_1fromordinal = {__Pyx_NAMESTR("fromordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_fromordinal)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_1fromordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_ordinal = 0;
  PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromordinal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cls,&__pyx_n_s__ordinal,&__pyx_n_s__offset,&__pyx_n_s__tz,0};
    PyObject* values[4] = {0,0,0,0};

    /* "pandas/tslib.pyx":150
 * 
 *     @classmethod
 *     def fromordinal(cls, ordinal, offset=None, tz=None):             # <<<<<<<<<<<<<<
 *         """ passed an ordinal, translate and convert to a ts
 *             note: by definition there cannot be any tz info on the ordinal itself """
 */
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ordinal)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromordinal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_ordinal = values[1];
    __pyx_v_offset = values[2];
    __pyx_v_tz = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(__pyx_self, __pyx_v_cls, __pyx_v_ordinal, __pyx_v_offset, __pyx_v_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_fromordinal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ordinal, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromordinal", 0);

  /* "pandas/tslib.pyx":153
 *         """ passed an ordinal, translate and convert to a ts
 *             note: by definition there cannot be any tz info on the ordinal itself """
 *         return cls(datetime.fromordinal(ordinal),offset=offset,tz=tz)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__fromordinal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_ordinal);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ordinal);
  __Pyx_GIVEREF(__pyx_v_ordinal);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__offset), __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_v_cls, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_3now(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_2now[] = " compat now with datetime ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_3now = {__Pyx_NAMESTR("now"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_3now, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_2now)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_3now(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("now (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cls,&__pyx_n_s__tz,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":156
 * 
 *     @classmethod
 *     def now(cls, tz=None):             # <<<<<<<<<<<<<<
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "now") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __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_cls = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("now", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_2now(__pyx_self, __pyx_v_cls, __pyx_v_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_2now(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("now", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "pandas/tslib.pyx":158
 *     def now(cls, tz=None):
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):             # <<<<<<<<<<<<<<
 *             tz = pytz.timezone(tz)
 *         return cls(datetime.now(tz))
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":159
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)             # <<<<<<<<<<<<<<
 *         return cls(datetime.now(tz))
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__timezone); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_tz);
    __pyx_v_tz = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":160
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)
 *         return cls(datetime.now(tz))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__now); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_v_cls, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_5today(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_4today[] = " compat today with datetime ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_5today = {__Pyx_NAMESTR("today"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_5today, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_4today)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_5today(PyObject *__pyx_self, PyObject *__pyx_v_cls) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("today (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_4today(__pyx_self, ((PyObject *)__pyx_v_cls));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":163
 * 
 *     @classmethod
 *     def today(cls):             # <<<<<<<<<<<<<<
 *         """ compat today with datetime """
 *         return cls(datetime.today())
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_4today(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("today", 0);

  /* "pandas/tslib.pyx":165
 *     def today(cls):
 *         """ compat today with datetime """
 *         return cls(datetime.today())             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__today); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_v_cls, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow = {__Pyx_NAMESTR("utcnow"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_7utcnow(PyObject *__pyx_self, PyObject *__pyx_v_cls) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcnow (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(__pyx_self, ((PyObject *)__pyx_v_cls));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":168
 * 
 *     @classmethod
 *     def utcnow(cls):             # <<<<<<<<<<<<<<
 *         return cls.now('UTC')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_6utcnow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcnow", 0);

  /* "pandas/tslib.pyx":169
 *     @classmethod
 *     def utcnow(cls):
 *         return cls.now('UTC')             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, object ts_input, object offset=None, tz=None, unit=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_cls, __pyx_n_s__now); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_9__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_9__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_9__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_9__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_ts_input = 0;
  PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cls,&__pyx_n_s__ts_input,&__pyx_n_s__offset,&__pyx_n_s__tz,&__pyx_n_s__unit,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "pandas/tslib.pyx":171
 *         return cls.now('UTC')
 * 
 *     def __new__(cls, object ts_input, object offset=None, tz=None, unit=None):             # <<<<<<<<<<<<<<
 *         cdef _TSObject ts
 *         cdef _Timestamp ts_base
 */
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ts_input)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_ts_input = values[1];
    __pyx_v_offset = values[2];
    __pyx_v_tz = values[3];
    __pyx_v_unit = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_8__new__(__pyx_self, __pyx_v_cls, __pyx_v_ts_input, __pyx_v_offset, __pyx_v_tz, __pyx_v_unit);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_ts_input, PyObject *__pyx_v_offset, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit) {
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0;
  struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_ts_base = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_INCREF(__pyx_v_ts_input);

  /* "pandas/tslib.pyx":175
 *         cdef _Timestamp ts_base
 * 
 *         if util.is_string_object(ts_input):             # <<<<<<<<<<<<<<
 *             try:
 *                 ts_input = parse_date(ts_input)
 */
  __pyx_t_1 = is_string_object(__pyx_v_ts_input);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":176
 * 
 *         if util.is_string_object(ts_input):
 *             try:             # <<<<<<<<<<<<<<
 *                 ts_input = parse_date(ts_input)
 *             except Exception:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "pandas/tslib.pyx":177
 *         if util.is_string_object(ts_input):
 *             try:
 *                 ts_input = parse_date(ts_input)             # <<<<<<<<<<<<<<
 *             except Exception:
 *                 pass
 */
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__parse_date); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_ts_input);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ts_input);
        __Pyx_GIVEREF(__pyx_v_ts_input);
        __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_v_ts_input);
        __pyx_v_ts_input = __pyx_t_7;
        __pyx_t_7 = 0;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L11_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":178
 *             try:
 *                 ts_input = parse_date(ts_input)
 *             except Exception:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
      __pyx_t_1 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_1) {
        PyErr_Restore(0,0,0);
        goto __pyx_L5_exception_handled;
      }
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L11_try_end:;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":181
 *                 pass
 * 
 *         ts = convert_to_tsobject(ts_input, tz, unit)             # <<<<<<<<<<<<<<
 * 
 *         if ts.value == NPY_NAT:
 */
  __pyx_t_7 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_ts_input, __pyx_v_tz, __pyx_v_unit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pandas/tslib.pyx":183
 *         ts = convert_to_tsobject(ts_input, tz, unit)
 * 
 *         if ts.value == NPY_NAT:             # <<<<<<<<<<<<<<
 *             return NaT
 * 
 */
  __pyx_t_8 = (__pyx_v_ts->value == __pyx_v_6pandas_5tslib_NPY_NAT);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":184
 * 
 *         if ts.value == NPY_NAT:
 *             return NaT             # <<<<<<<<<<<<<<
 * 
 *         # make datetime happy
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "pandas/tslib.pyx":187
 * 
 *         # make datetime happy
 *         ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month,             # <<<<<<<<<<<<<<
 *                                      ts.dts.day, ts.dts.hour, ts.dts.min,
 *                                      ts.dts.sec, ts.dts.us, ts.tzinfo)
 */
  __pyx_t_7 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)), __pyx_n_s____new__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ts->dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "pandas/tslib.pyx":188
 *         # make datetime happy
 *         ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month,
 *                                      ts.dts.day, ts.dts.hour, ts.dts.min,             # <<<<<<<<<<<<<<
 *                                      ts.dts.sec, ts.dts.us, ts.tzinfo)
 * 
 */
  __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.day); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.hour); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.min); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);

  /* "pandas/tslib.pyx":189
 *         ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month,
 *                                      ts.dts.day, ts.dts.hour, ts.dts.min,
 *                                      ts.dts.sec, ts.dts.us, ts.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         # fill out rest of data
 */
  __pyx_t_12 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.sec); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.us); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyTuple_New(9); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_INCREF(__pyx_v_cls);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_13);
  __Pyx_INCREF(__pyx_v_ts->tzinfo);
  PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_v_ts->tzinfo);
  __Pyx_GIVEREF(__pyx_v_ts->tzinfo);
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;
  __pyx_t_13 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
  if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ts_base = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_13);
  __pyx_t_13 = 0;

  /* "pandas/tslib.pyx":192
 * 
 *         # fill out rest of data
 *         ts_base.value = ts.value             # <<<<<<<<<<<<<<
 *         ts_base.offset = offset
 *         ts_base.nanosecond = ts.dts.ps / 1000
 */
  __pyx_t_15 = __pyx_v_ts->value;
  __pyx_v_ts_base->value = __pyx_t_15;

  /* "pandas/tslib.pyx":193
 *         # fill out rest of data
 *         ts_base.value = ts.value
 *         ts_base.offset = offset             # <<<<<<<<<<<<<<
 *         ts_base.nanosecond = ts.dts.ps / 1000
 * 
 */
  __Pyx_INCREF(__pyx_v_offset);
  __Pyx_GIVEREF(__pyx_v_offset);
  __Pyx_GOTREF(__pyx_v_ts_base->offset);
  __Pyx_DECREF(__pyx_v_ts_base->offset);
  __pyx_v_ts_base->offset = __pyx_v_offset;

  /* "pandas/tslib.pyx":194
 *         ts_base.value = ts.value
 *         ts_base.offset = offset
 *         ts_base.nanosecond = ts.dts.ps / 1000             # <<<<<<<<<<<<<<
 * 
 *         return ts_base
 */
  __pyx_v_ts_base->nanosecond = __Pyx_div_long(__pyx_v_ts->dts.ps, 1000);

  /* "pandas/tslib.pyx":196
 *         ts_base.nanosecond = ts.dts.ps / 1000
 * 
 *         return ts_base             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ts_base));
  __pyx_r = ((PyObject *)__pyx_v_ts_base);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ts);
  __Pyx_XDECREF((PyObject *)__pyx_v_ts_base);
  __Pyx_XDECREF(__pyx_v_ts_input);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":198
 *         return ts_base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         result = self._repr_base
 *         zone = None
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_zone = NULL;
  PyObject *__pyx_v_year2000 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pandas/tslib.pyx":199
 * 
 *     def __repr__(self):
 *         result = self._repr_base             # <<<<<<<<<<<<<<
 *         zone = None
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___repr_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":200
 *     def __repr__(self):
 *         result = self._repr_base
 *         zone = None             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_zone = Py_None;

  /* "pandas/tslib.pyx":202
 *         zone = None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             result += self.strftime('%z')
 *             if self.tzinfo:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pandas/tslib.pyx":203
 * 
 *         try:
 *             result += self.strftime('%z')             # <<<<<<<<<<<<<<
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__strftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":204
 *         try:
 *             result += self.strftime('%z')
 *             if self.tzinfo:             # <<<<<<<<<<<<<<
 *                 zone = _get_zone(self.tzinfo)
 *         except ValueError:
 */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "pandas/tslib.pyx":205
 *             result += self.strftime('%z')
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             year2000 = self.replace(year=2000)
 */
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_v_zone);
        __pyx_v_zone = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/tslib.pyx":206
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             year2000 = self.replace(year=2000)
 *             result += year2000.strftime('%z')
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas.tslib.Timestamp.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pandas/tslib.pyx":207
 *                 zone = _get_zone(self.tzinfo)
 *         except ValueError:
 *             year2000 = self.replace(year=2000)             # <<<<<<<<<<<<<<
 *             result += year2000.strftime('%z')
 *             if self.tzinfo:
 */
      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__replace); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
      if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__year), __pyx_int_2000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __pyx_t_11 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      __pyx_v_year2000 = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "pandas/tslib.pyx":208
 *         except ValueError:
 *             year2000 = self.replace(year=2000)
 *             result += year2000.strftime('%z')             # <<<<<<<<<<<<<<
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 */
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_year2000, __pyx_n_s__strftime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "pandas/tslib.pyx":209
 *             year2000 = self.replace(year=2000)
 *             result += year2000.strftime('%z')
 *             if self.tzinfo:             # <<<<<<<<<<<<<<
 *                 zone = _get_zone(self.tzinfo)
 * 
 */
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_6) {

        /* "pandas/tslib.pyx":210
 *             result += year2000.strftime('%z')
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
        __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_v_zone);
        __pyx_v_zone = __pyx_t_10;
        __pyx_t_10 = 0;
        goto __pyx_L14;
      }
      __pyx_L14:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L10_try_end:;
  }

  /* "pandas/tslib.pyx":212
 *                 zone = _get_zone(self.tzinfo)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             result += zone.strftime(' %%Z')
 *         except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    /*try:*/ {

      /* "pandas/tslib.pyx":213
 * 
 *         try:
 *             result += zone.strftime(' %%Z')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_zone, __pyx_n_s__strftime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_8;
      __pyx_t_8 = 0;
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L22_try_end;
    __pyx_L15_error:;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pandas/tslib.pyx":214
 *         try:
 *             result += zone.strftime(' %%Z')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         zone = "'%s'" % zone if zone else 'None'
 */
    /*except:*/ {
      PyErr_Restore(0,0,0);
      goto __pyx_L16_exception_handled;
    }
    __pyx_L16_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
    __pyx_L22_try_end:;
  }

  /* "pandas/tslib.pyx":216
 *         except:
 *             pass
 *         zone = "'%s'" % zone if zone else 'None'             # <<<<<<<<<<<<<<
 * 
 *         return "Timestamp('%s', tz=%s)" % (result, zone)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_zone); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_6) {
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_v_zone); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_8 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(((PyObject *)__pyx_n_s__None));
    __pyx_t_8 = __pyx_n_s__None;
  }
  __Pyx_DECREF(__pyx_v_zone);
  __pyx_v_zone = ((PyObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/tslib.pyx":218
 *         zone = "'%s'" % zone if zone else 'None'
 * 
 *         return "Timestamp('%s', tz=%s)" % (result, zone)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __Pyx_INCREF(__pyx_v_zone);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_zone);
  __Pyx_GIVEREF(__pyx_v_zone);
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_zone);
  __Pyx_XDECREF(__pyx_v_year2000);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_13_date_repr = {__Pyx_NAMESTR("_date_repr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_13_date_repr(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_date_repr (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":221
 * 
 *     @property
 *     def _date_repr(self):             # <<<<<<<<<<<<<<
 *         # Ideal here would be self.strftime("%Y-%m-%d"), but
 *         # the datetime strftime() methods require year >= 1900
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_12_date_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_date_repr", 0);

  /* "pandas/tslib.pyx":224
 *         # Ideal here would be self.strftime("%Y-%m-%d"), but
 *         # the datetime strftime() methods require year >= 1900
 *         return '%d-%.2d-%.2d' % (self.year, self.month, self.day)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__day); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __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);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_15_time_repr = {__Pyx_NAMESTR("_time_repr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_15_time_repr(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_time_repr (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":227
 * 
 *     @property
 *     def _time_repr(self):             # <<<<<<<<<<<<<<
 *         result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_14_time_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_nanos = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_time_repr", 0);

  /* "pandas/tslib.pyx":228
 *     @property
 *     def _time_repr(self):
 *         result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)             # <<<<<<<<<<<<<<
 * 
 *         if self.nanosecond != 0:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__minute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__second); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __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[0]; __pyx_lineno = 228; __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);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_result = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":230
 *         result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)
 * 
 *         if self.nanosecond != 0:             # <<<<<<<<<<<<<<
 *             nanos = self.nanosecond + 1000 * self.microsecond
 *             result += '.%.9d' % nanos
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":231
 * 
 *         if self.nanosecond != 0:
 *             nanos = self.nanosecond + 1000 * self.microsecond             # <<<<<<<<<<<<<<
 *             result += '.%.9d' % nanos
 *         elif self.microsecond != 0:
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Multiply(__pyx_int_1000, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_nanos = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":232
 *         if self.nanosecond != 0:
 *             nanos = self.nanosecond + 1000 * self.microsecond
 *             result += '.%.9d' % nanos             # <<<<<<<<<<<<<<
 *         elif self.microsecond != 0:
 *             result += '.%.6d' % self.microsecond
 */
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_v_nanos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":233
 *             nanos = self.nanosecond + 1000 * self.microsecond
 *             result += '.%.9d' % nanos
 *         elif self.microsecond != 0:             # <<<<<<<<<<<<<<
 *             result += '.%.6d' % self.microsecond
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":234
 *             result += '.%.9d' % nanos
 *         elif self.microsecond != 0:
 *             result += '.%.6d' % self.microsecond             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_result, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":236
 *             result += '.%.6d' % self.microsecond
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib.Timestamp._time_repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_nanos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_17_repr_base = {__Pyx_NAMESTR("_repr_base"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_17_repr_base(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_base (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":239
 * 
 *     @property
 *     def _repr_base(self):             # <<<<<<<<<<<<<<
 *         return '%s %s' % (self._date_repr, self._time_repr)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_16_repr_base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr_base", 0);

  /* "pandas/tslib.pyx":240
 *     @property
 *     def _repr_base(self):
 *         return '%s %s' % (self._date_repr, self._time_repr)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___date_repr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___time_repr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_19tz(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_18tz[] = "\n        Alias for tzinfo\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_19tz = {__Pyx_NAMESTR("tz"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_19tz, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_18tz)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_19tz(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_18tz(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":243
 * 
 *     @property
 *     def tz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for tzinfo
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_18tz(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz", 0);

  /* "pandas/tslib.pyx":247
 *         Alias for tzinfo
 *         """
 *         return self.tzinfo             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_21freq(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_21freq = {__Pyx_NAMESTR("freq"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_21freq, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_21freq(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("freq (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_20freq(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":250
 * 
 *     @property
 *     def freq(self):             # <<<<<<<<<<<<<<
 *         return self.offset
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_20freq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("freq", 0);

  /* "pandas/tslib.pyx":251
 *     @property
 *     def freq(self):
 *         return self.offset             # <<<<<<<<<<<<<<
 * 
 *     def __setstate__(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_23__setstate__ = {__Pyx_NAMESTR("__setstate__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_23__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__state,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setstate__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __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_self = values[0];
    __pyx_v_state = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":253
 *         return self.offset
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.value = state[0]
 *         self.offset = state[1]
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_22__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 0);

  /* "pandas/tslib.pyx":254
 * 
 *     def __setstate__(self, state):
 *         self.value = state[0]             # <<<<<<<<<<<<<<
 *         self.offset = state[1]
 *         self.tzinfo = state[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__value, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":255
 *     def __setstate__(self, state):
 *         self.value = state[0]
 *         self.offset = state[1]             # <<<<<<<<<<<<<<
 *         self.tzinfo = state[2]
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__offset, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":256
 *         self.value = state[0]
 *         self.offset = state[1]
 *         self.tzinfo = state[2]             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_state, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__tzinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_25__reduce__ = {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_25__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":258
 *         self.tzinfo = state[2]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         object_state = self.value, self.offset, self.tzinfo
 *         return (Timestamp, object_state)
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_24__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_object_state = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "pandas/tslib.pyx":259
 * 
 *     def __reduce__(self):
 *         object_state = self.value, self.offset, self.tzinfo             # <<<<<<<<<<<<<<
 *         return (Timestamp, object_state)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __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[0]; __pyx_lineno = 259; __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);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_object_state = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":260
 *     def __reduce__(self):
 *         object_state = self.value, self.offset, self.tzinfo
 *         return (Timestamp, object_state)             # <<<<<<<<<<<<<<
 * 
 *     def to_period(self, freq=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __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_INCREF(((PyObject *)__pyx_v_object_state));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_object_state));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_object_state));
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_27to_period(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_26to_period[] = "\n        Return an period of which this timestamp is an observation.\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_27to_period = {__Pyx_NAMESTR("to_period"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_27to_period, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_26to_period)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_27to_period(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_freq = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_period (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__freq,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":262
 *         return (Timestamp, object_state)
 * 
 *     def to_period(self, freq=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return an period of which this timestamp is an observation.
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_period") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __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_self = values[0];
    __pyx_v_freq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_period", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.to_period", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_26to_period(__pyx_self, __pyx_v_self, __pyx_v_freq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_26to_period(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_freq) {
  PyObject *__pyx_v_Period = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_period", 0);
  __Pyx_INCREF(__pyx_v_freq);

  /* "pandas/tslib.pyx":266
 *         Return an period of which this timestamp is an observation.
 *         """
 *         from pandas.tseries.period import Period             # <<<<<<<<<<<<<<
 * 
 *         if freq is None:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Period));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_14), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Period);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Period);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_Period = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":268
 *         from pandas.tseries.period import Period
 * 
 *         if freq is None:             # <<<<<<<<<<<<<<
 *             freq = self.freq
 * 
 */
  __pyx_t_3 = (__pyx_v_freq == Py_None);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":269
 * 
 *         if freq is None:
 *             freq = self.freq             # <<<<<<<<<<<<<<
 * 
 *         return Period(self, freq=freq)
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__freq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_freq);
    __pyx_v_freq = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":271
 *             freq = self.freq
 * 
 *         return Period(self, freq=freq)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__freq), __pyx_v_freq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_v_Period, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.to_period", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Period);
  __Pyx_XDECREF(__pyx_v_freq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek = {__Pyx_NAMESTR("dayofweek"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_29dayofweek(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dayofweek (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":274
 * 
 *     @property
 *     def dayofweek(self):             # <<<<<<<<<<<<<<
 *         return self.weekday()
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_28dayofweek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dayofweek", 0);

  /* "pandas/tslib.pyx":275
 *     @property
 *     def dayofweek(self):
 *         return self.weekday()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__weekday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_31dayofyear = {__Pyx_NAMESTR("dayofyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_31dayofyear(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dayofyear (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":278
 * 
 *     @property
 *     def dayofyear(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('doy')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_30dayofyear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dayofyear", 0);

  /* "pandas/tslib.pyx":279
 *     @property
 *     def dayofyear(self):
 *         return self._get_field('doy')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_33week(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_33week = {__Pyx_NAMESTR("week"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_33week, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_33week(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("week (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_32week(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":282
 * 
 *     @property
 *     def week(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('woy')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_32week(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("week", 0);

  /* "pandas/tslib.pyx":283
 *     @property
 *     def week(self):
 *         return self._get_field('woy')             # <<<<<<<<<<<<<<
 * 
 *     weekofyear = week
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_35quarter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_35quarter = {__Pyx_NAMESTR("quarter"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_35quarter, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_35quarter(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quarter (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_34quarter(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":288
 * 
 *     @property
 *     def quarter(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('q')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_34quarter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quarter", 0);

  /* "pandas/tslib.pyx":289
 *     @property
 *     def quarter(self):
 *         return self._get_field('q')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_37freqstr = {__Pyx_NAMESTR("freqstr"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_37freqstr(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("freqstr (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":292
 * 
 *     @property
 *     def freqstr(self):             # <<<<<<<<<<<<<<
 *         return getattr(self.offset, 'freqstr', self.offset)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_36freqstr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("freqstr", 0);

  /* "pandas/tslib.pyx":293
 *     @property
 *     def freqstr(self):
 *         return getattr(self.offset, 'freqstr', self.offset)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_n_s__freqstr);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_39asm8(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_39asm8 = {__Pyx_NAMESTR("asm8"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_39asm8, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_39asm8(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("asm8 (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_38asm8(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":296
 * 
 *     @property
 *     def asm8(self):             # <<<<<<<<<<<<<<
 *         return np.int64(self.value).view('M8[ns]')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_38asm8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("asm8", 0);

  /* "pandas/tslib.pyx":297
 *     @property
 *     def asm8(self):
 *         return np.int64(self.value).view('M8[ns]')             # <<<<<<<<<<<<<<
 * 
 *     def tz_localize(self, tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_40tz_localize[] = "\n        Convert naive Timestamp to local time zone\n\n        Parameters\n        ----------\n        tz : pytz.timezone\n\n        Returns\n        -------\n        localized : Timestamp\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_41tz_localize = {__Pyx_NAMESTR("tz_localize"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_40tz_localize)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_41tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_localize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__tz,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_localize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __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_self = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(__pyx_self, __pyx_v_self, __pyx_v_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":299
 *         return np.int64(self.value).view('M8[ns]')
 * 
 *     def tz_localize(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert naive Timestamp to local time zone
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_localize", 0);

  /* "pandas/tslib.pyx":311
 *         localized : Timestamp
 *         """
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             # tz naive, localize
 *             return Timestamp(self.to_pydatetime(), tz=tz)
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":313
 *         if self.tzinfo is None:
 *             # tz naive, localize
 *             return Timestamp(self.to_pydatetime(), tz=tz)             # <<<<<<<<<<<<<<
 *         else:
 *             raise Exception('Cannot localize tz-aware Timestamp, use '
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__to_pydatetime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __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[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":315
 *             return Timestamp(self.to_pydatetime(), tz=tz)
 *         else:
 *             raise Exception('Cannot localize tz-aware Timestamp, use '             # <<<<<<<<<<<<<<
 *                             'tz_convert for conversions')
 * 
 */
    __pyx_t_5 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_42tz_convert[] = "\n        Convert Timestamp to another time zone or localize to requested time\n        zone\n\n        Parameters\n        ----------\n        tz : pytz.timezone\n\n        Returns\n        -------\n        converted : Timestamp\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_43tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_42tz_convert)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_43tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__tz,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __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_self = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(__pyx_self, __pyx_v_self, __pyx_v_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":318
 *                             'tz_convert for conversions')
 * 
 *     def tz_convert(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Timestamp to another time zone or localize to requested time
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_convert", 0);

  /* "pandas/tslib.pyx":331
 *         converted : Timestamp
 *         """
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             # tz naive, use tz_localize
 *             raise Exception('Cannot convert tz-naive Timestamp, use '
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":333
 *         if self.tzinfo is None:
 *             # tz naive, use tz_localize
 *             raise Exception('Cannot convert tz-naive Timestamp, use '             # <<<<<<<<<<<<<<
 *                             'tz_localize to localize')
 *         else:
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":337
 *         else:
 *             # Same UTC timestamp, different time zone
 *             return Timestamp(self.value, tz=tz)             # <<<<<<<<<<<<<<
 * 
 *     astimezone = tz_convert
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __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[0]; __pyx_lineno = 337; __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[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_45replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_45replace = {__Pyx_NAMESTR("replace"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_45replace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_45replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kwds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("replace (wrapper)", 0);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "replace") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("replace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_44replace(__pyx_self, __pyx_v_self, __pyx_v_kwds);
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":341
 *     astimezone = tz_convert
 * 
 *     def replace(self, **kwds):             # <<<<<<<<<<<<<<
 *         return Timestamp(datetime.replace(self, **kwds),
 *                          offset=self.offset)
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("replace", 0);

  /* "pandas/tslib.pyx":342
 * 
 *     def replace(self, **kwds):
 *         return Timestamp(datetime.replace(self, **kwds),             # <<<<<<<<<<<<<<
 *                          offset=self.offset)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_4 = ((PyObject *)__pyx_v_kwds);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __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[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "pandas/tslib.pyx":343
 *     def replace(self, **kwds):
 *         return Timestamp(datetime.replace(self, **kwds),
 *                          offset=self.offset)             # <<<<<<<<<<<<<<
 * 
 *     def to_pydatetime(self, warn=True):
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__offset), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":345
 *                          offset=self.offset)
 * 
 *     def to_pydatetime(self, warn=True):             # <<<<<<<<<<<<<<
 *         """
 *         If warn=True, issue warning if nanoseconds is nonzero
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_warn);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_warn);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_warn);
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_46to_pydatetime[] = "\n        If warn=True, issue warning if nanoseconds is nonzero\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_47to_pydatetime = {__Pyx_NAMESTR("to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_46to_pydatetime)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_warn = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_pydatetime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__warn,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_warn;
    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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__warn);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_pydatetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __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_self = values[0];
    __pyx_v_warn = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_pydatetime", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(__pyx_self, __pyx_v_self, __pyx_v_warn);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn) {
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_pydatetime", 0);

  /* "pandas/tslib.pyx":353
 *             _TSObject ts
 * 
 *         if self.nanosecond != 0 and warn:             # <<<<<<<<<<<<<<
 *             print 'Warning: discarding nonzero nanoseconds'
 *         ts = convert_to_tsobject(self, self.tzinfo, None)
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_warn); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":354
 * 
 *         if self.nanosecond != 0 and warn:
 *             print 'Warning: discarding nonzero nanoseconds'             # <<<<<<<<<<<<<<
 *         ts = convert_to_tsobject(self, self.tzinfo, None)
 * 
 */
    if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_24)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":355
 *         if self.nanosecond != 0 and warn:
 *             print 'Warning: discarding nonzero nanoseconds'
 *         ts = convert_to_tsobject(self, self.tzinfo, None)             # <<<<<<<<<<<<<<
 * 
 *         return datetime(ts.dts.year, ts.dts.month, ts.dts.day,
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_self, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":357
 *         ts = convert_to_tsobject(self, self.tzinfo, None)
 * 
 *         return datetime(ts.dts.year, ts.dts.month, ts.dts.day,             # <<<<<<<<<<<<<<
 *                         ts.dts.hour, ts.dts.min, ts.dts.sec,
 *                         ts.dts.us, ts.tzinfo)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ts->dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/tslib.pyx":358
 * 
 *         return datetime(ts.dts.year, ts.dts.month, ts.dts.day,
 *                         ts.dts.hour, ts.dts.min, ts.dts.sec,             # <<<<<<<<<<<<<<
 *                         ts.dts.us, ts.tzinfo)
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.sec); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "pandas/tslib.pyx":359
 *         return datetime(ts.dts.year, ts.dts.month, ts.dts.day,
 *                         ts.dts.hour, ts.dts.min, ts.dts.sec,
 *                         ts.dts.us, ts.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *     def isoformat(self, sep='T'):
 */
  __pyx_t_10 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ts->dts.us); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __Pyx_INCREF(__pyx_v_ts->tzinfo);
  PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_v_ts->tzinfo);
  __Pyx_GIVEREF(__pyx_v_ts->tzinfo);
  __pyx_t_6 = 0;
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  __pyx_r = __pyx_t_10;
  __pyx_t_10 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.to_pydatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_49isoformat = {__Pyx_NAMESTR("isoformat"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_sep = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoformat (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__sep,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s__T));
    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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sep);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isoformat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __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_self = values[0];
    __pyx_v_sep = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isoformat", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.Timestamp.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(__pyx_self, __pyx_v_self, __pyx_v_sep);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":361
 *                         ts.dts.us, ts.tzinfo)
 * 
 *     def isoformat(self, sep='T'):             # <<<<<<<<<<<<<<
 *         base = super(_Timestamp, self).isoformat(sep=sep)
 *         if self.nanosecond == 0:
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep) {
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_base1 = NULL;
  PyObject *__pyx_v_base2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoformat", 0);

  /* "pandas/tslib.pyx":362
 * 
 *     def isoformat(self, sep='T'):
 *         base = super(_Timestamp, self).isoformat(sep=sep)             # <<<<<<<<<<<<<<
 *         if self.nanosecond == 0:
 *             return base
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__isoformat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__sep), __pyx_v_sep) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_base = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":363
 *     def isoformat(self, sep='T'):
 *         base = super(_Timestamp, self).isoformat(sep=sep)
 *         if self.nanosecond == 0:             # <<<<<<<<<<<<<<
 *             return base
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":364
 *         base = super(_Timestamp, self).isoformat(sep=sep)
 *         if self.nanosecond == 0:
 *             return base             # <<<<<<<<<<<<<<
 * 
 *         if self.tzinfo is not None:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_base);
    __pyx_r = __pyx_v_base;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":366
 *             return base
 * 
 *         if self.tzinfo is not None:             # <<<<<<<<<<<<<<
 *             base1, base2 = base[:-6], base[-6:]
 *         else:
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":367
 * 
 *         if self.tzinfo is not None:
 *             base1, base2 = base[:-6], base[-6:]             # <<<<<<<<<<<<<<
 *         else:
 *             base1, base2 = base, ""
 */
    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_base, 0, -6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_base, -6, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_base1 = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_base2 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":369
 *             base1, base2 = base[:-6], base[-6:]
 *         else:
 *             base1, base2 = base, ""             # <<<<<<<<<<<<<<
 * 
 *         if self.microsecond != 0:
 */
    __pyx_t_3 = __pyx_v_base;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = ((PyObject *)__pyx_kp_s_25);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_base1 = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_base2 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":371
 *             base1, base2 = base, ""
 * 
 *         if self.microsecond != 0:             # <<<<<<<<<<<<<<
 *             base1 += "%.3d" % self.nanosecond
 *         else:
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":372
 * 
 *         if self.microsecond != 0:
 *             base1 += "%.3d" % self.nanosecond             # <<<<<<<<<<<<<<
 *         else:
 *             base1 += ".%.9d" % self.nanosecond
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_26), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_base1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_base1);
    __pyx_v_base1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":374
 *             base1 += "%.3d" % self.nanosecond
 *         else:
 *             base1 += ".%.9d" % self.nanosecond             # <<<<<<<<<<<<<<
 * 
 *         return base1 + base2
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_base1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_base1);
    __pyx_v_base1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":376
 *             base1 += ".%.9d" % self.nanosecond
 * 
 *         return base1 + base2             # <<<<<<<<<<<<<<
 * 
 *     def _has_time_component(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyNumber_Add(__pyx_v_base1, __pyx_v_base2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_base1);
  __Pyx_XDECREF(__pyx_v_base2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_50_has_time_component[] = "\n        Returns if the Timestamp has a time component\n        in addition to the date part\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_51_has_time_component = {__Pyx_NAMESTR("_has_time_component"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_50_has_time_component)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_has_time_component (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_50_has_time_component(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":378
 *         return base1 + base2
 * 
 *     def _has_time_component(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns if the Timestamp has a time component
 */

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

  /* "pandas/tslib.pyx":383
 *         in addition to the date part
 *         """
 *         return (self.time() != _zero_time             # <<<<<<<<<<<<<<
 *                 or self.tzinfo is not None
 *                 or self.nanosecond != 0)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/tslib.pyx":384
 *         """
 *         return (self.time() != _zero_time
 *                 or self.tzinfo is not None             # <<<<<<<<<<<<<<
 *                 or self.nanosecond != 0)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/tslib.pyx":383
 *         in addition to the date part
 *         """
 *         return (self.time() != _zero_time             # <<<<<<<<<<<<<<
 *                 or self.tzinfo is not None
 *                 or self.nanosecond != 0)
 */
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":384
 *         """
 *         return (self.time() != _zero_time
 *                 or self.tzinfo is not None             # <<<<<<<<<<<<<<
 *                 or self.nanosecond != 0)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___zero_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":385
 *         return (self.time() != _zero_time
 *                 or self.tzinfo is not None
 *                 or self.nanosecond != 0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);

    /* "pandas/tslib.pyx":384
 *         """
 *         return (self.time() != _zero_time
 *                 or self.tzinfo is not None             # <<<<<<<<<<<<<<
 *                 or self.nanosecond != 0)
 * 
 */
    __pyx_t_4 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_4) {
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":385
 *         return (self.time() != _zero_time
 *                 or self.tzinfo is not None
 *                 or self.nanosecond != 0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __pyx_t_2 = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_1__new__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType___new__(__pyx_self, ((PyObject *)__pyx_v_cls));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":392
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef _NaT base
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls) {
  struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_base = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "pandas/tslib.pyx":395
 *         cdef _NaT base
 * 
 *         base = _NaT.__new__(cls, 1, 1, 1)             # <<<<<<<<<<<<<<
 *         mangle_nat(base)
 *         base.value = NPY_NAT
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)), __pyx_n_s____new__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_cls);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5tslib__NaT))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_base = ((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":396
 * 
 *         base = _NaT.__new__(cls, 1, 1, 1)
 *         mangle_nat(base)             # <<<<<<<<<<<<<<
 *         base.value = NPY_NAT
 * 
 */
  mangle_nat(((PyObject *)__pyx_v_base));

  /* "pandas/tslib.pyx":397
 *         base = _NaT.__new__(cls, 1, 1, 1)
 *         mangle_nat(base)
 *         base.value = NPY_NAT             # <<<<<<<<<<<<<<
 * 
 *         return base
 */
  __pyx_v_base->__pyx_base.value = __pyx_v_6pandas_5tslib_NPY_NAT;

  /* "pandas/tslib.pyx":399
 *         base.value = NPY_NAT
 * 
 *         return base             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.tslib.NaTType.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_base);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_3__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_3__repr__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_2__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":401
 *         return base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pandas/tslib.pyx":402
 * 
 *     def __repr__(self):
 *         return 'NaT'             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT));
  __pyx_r = ((PyObject *)__pyx_n_s__NaT);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_5__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_5__str__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_4__str__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":404
 *         return 'NaT'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_4__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pandas/tslib.pyx":405
 * 
 *     def __str__(self):
 *         return 'NaT'             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT));
  __pyx_r = ((PyObject *)__pyx_n_s__NaT);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_7__hash__ = {__Pyx_NAMESTR("__hash__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_7__hash__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_7__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_6__hash__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":407
 *         return 'NaT'
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return iNaT
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_6__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pandas/tslib.pyx":408
 * 
 *     def __hash__(self):
 *         return iNaT             # <<<<<<<<<<<<<<
 * 
 *     def weekday(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_9weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_9weekday = {__Pyx_NAMESTR("weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_9weekday, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_9weekday(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weekday (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_8weekday(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":410
 *         return iNaT
 * 
 *     def weekday(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weekday", 0);

  /* "pandas/tslib.pyx":411
 * 
 *     def weekday(self):
 *         return -1             # <<<<<<<<<<<<<<
 * 
 *     def toordinal(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_r = __pyx_int_neg_1;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_11toordinal = {__Pyx_NAMESTR("toordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_11toordinal, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toordinal (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_10toordinal(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":413
 *         return -1
 * 
 *     def toordinal(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toordinal", 0);

  /* "pandas/tslib.pyx":414
 * 
 *     def toordinal(self):
 *         return -1             # <<<<<<<<<<<<<<
 * 
 * fields = ['year', 'quarter', 'month', 'day', 'hour',
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_neg_1);
  __pyx_r = __pyx_int_neg_1;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":429
 * 
 * 
 * cdef inline bint _checknull_with_nat(object val):             # <<<<<<<<<<<<<<
 *     """ utility to check if a value is a nat or not """
 *     return val is None or (
 */

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

  /* "pandas/tslib.pyx":431
 * cdef inline bint _checknull_with_nat(object val):
 *     """ utility to check if a value is a nat or not """
 *     return val is None or (             # <<<<<<<<<<<<<<
 *         PyFloat_Check(val) and val != val) or val is NaT
 * 
 */
  __pyx_t_1 = (__pyx_v_val == Py_None);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_1) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":432
 *     """ utility to check if a value is a nat or not """
 *     return val is None or (
 *         PyFloat_Check(val) and val != val) or val is NaT             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1:
 */
    __pyx_t_3 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __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[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
    } else {
      __pyx_t_5 = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = (__pyx_v_val == __pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __pyx_t_5 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":434
 *         PyFloat_Check(val) and val != val) or val is NaT
 * 
 * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1:             # <<<<<<<<<<<<<<
 *     return _nat_scalar_rules[op]
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_nat_dt(CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_lhs, CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_rhs, int __pyx_v_op) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cmp_nat_dt", 0);

  /* "pandas/tslib.pyx":435
 * 
 * cdef inline bint _cmp_nat_dt(_NaT lhs, _Timestamp rhs, int op) except -1:
 *     return _nat_scalar_rules[op]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (__pyx_v_6pandas_5tslib__nat_scalar_rules[__pyx_v_op]);
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":438
 * 
 * 
 * cdef _tz_format(object obj, object zone):             # <<<<<<<<<<<<<<
 *     try:
 *         return obj.strftime(' %%Z, tz=%s' % zone)
 */

static PyObject *__pyx_f_6pandas_5tslib__tz_format(PyObject *__pyx_v_obj, PyObject *__pyx_v_zone) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_tz_format", 0);

  /* "pandas/tslib.pyx":439
 * 
 * cdef _tz_format(object obj, object zone):
 *     try:             # <<<<<<<<<<<<<<
 *         return obj.strftime(' %%Z, tz=%s' % zone)
 *     except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/tslib.pyx":440
 * cdef _tz_format(object obj, object zone):
 *     try:
 *         return obj.strftime(' %%Z, tz=%s' % zone)             # <<<<<<<<<<<<<<
 *     except:
 *         return ', tz=%s' % zone
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s__strftime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_27), __pyx_v_zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/tslib.pyx":441
 *     try:
 *         return obj.strftime(' %%Z, tz=%s' % zone)
 *     except:             # <<<<<<<<<<<<<<
 *         return ', tz=%s' % zone
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("pandas.tslib._tz_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_4);

      /* "pandas/tslib.pyx":442
 *         return obj.strftime(' %%Z, tz=%s' % zone)
 *     except:
 *         return ', tz=%s' % zone             # <<<<<<<<<<<<<<
 * 
 * def is_timestamp_array(ndarray[object] values):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), __pyx_v_zone); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
      __pyx_r = ((PyObject *)__pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.tslib._tz_format", __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_5tslib_7is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7is_timestamp_array = {__Pyx_NAMESTR("is_timestamp_array"), (PyCFunction)__pyx_pw_6pandas_5tslib_7is_timestamp_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timestamp_array (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_6is_timestamp_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":444
 *         return ', tz=%s' % zone
 * 
 * def is_timestamp_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_5tslib_6is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_timestamp_array", 0);
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __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/tslib.pyx":445
 * 
 * def is_timestamp_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

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

    /* "pandas/tslib.pyx":447
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not is_timestamp(values[i]):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":448
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not is_timestamp(values[i]):
 *             return False
 */
  __pyx_t_4 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pandas/tslib.pyx":449
 *         return False
 *     for i in range(n):
 *         if not is_timestamp(values[i]):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __pyx_t_2 = (!__pyx_f_6pandas_5tslib_is_timestamp(__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "pandas/tslib.pyx":450
 *     for i in range(n):
 *         if not is_timestamp(values[i]):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/tslib.pyx":451
 *         if not is_timestamp(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":454
 * 
 * 
 * cpdef object get_value_box(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_get_value_box(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_box", 0);
  __Pyx_INCREF(__pyx_v_loc);

  /* "pandas/tslib.pyx":458
 *         Py_ssize_t i, sz
 *         void* data_ptr
 *     if util.is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":459
 *         void* data_ptr
 *     if util.is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":460
 *     if util.is_float_object(loc):
 *         casted = int(loc)
 *         if casted == loc:             # <<<<<<<<<<<<<<
 *             loc = casted
 *     i = <Py_ssize_t> loc
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":461
 *         casted = int(loc)
 *         if casted == loc:
 *             loc = casted             # <<<<<<<<<<<<<<
 *     i = <Py_ssize_t> loc
 *     sz = np.PyArray_SIZE(arr)
 */
      __Pyx_INCREF(__pyx_v_casted);
      __Pyx_DECREF(__pyx_v_loc);
      __pyx_v_loc = __pyx_v_casted;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":462
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = np.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_5);

  /* "pandas/tslib.pyx":463
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = np.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0 and sz > 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "pandas/tslib.pyx":465
 *     sz = np.PyArray_SIZE(arr)
 * 
 *     if i < 0 and sz > 0:             # <<<<<<<<<<<<<<
 *         i += sz
 * 
 */
  __pyx_t_4 = (__pyx_v_i < 0);
  if (__pyx_t_4) {
    __pyx_t_6 = (__pyx_v_sz > 0);
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_4;
  }
  if (__pyx_t_7) {

    /* "pandas/tslib.pyx":466
 * 
 *     if i < 0 and sz > 0:
 *         i += sz             # <<<<<<<<<<<<<<
 * 
 *     if i >= sz or sz == 0 or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + __pyx_v_sz);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":468
 *         i += sz
 * 
 *     if i >= sz or sz == 0 or i < 0:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_7 = (__pyx_v_i >= __pyx_v_sz);
  if (!__pyx_t_7) {
    __pyx_t_4 = (__pyx_v_sz == 0);
    if (!__pyx_t_4) {
      __pyx_t_6 = (__pyx_v_i < 0);
      __pyx_t_8 = __pyx_t_6;
    } else {
      __pyx_t_8 = __pyx_t_4;
    }
    __pyx_t_4 = __pyx_t_8;
  } else {
    __pyx_t_4 = __pyx_t_7;
  }
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":469
 * 
 *     if i >= sz or sz == 0 or i < 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     if arr.descr.type_num == NPY_DATETIME:
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/tslib.pyx":471
 *         raise IndexError('index out of bounds')
 * 
 *     if arr.descr.type_num == NPY_DATETIME:             # <<<<<<<<<<<<<<
 *         return Timestamp(util.get_value_1d(arr, i))
 *     else:
 */
  __pyx_t_4 = (__pyx_v_arr->descr->type_num == NPY_DATETIME);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":472
 * 
 *     if arr.descr.type_num == NPY_DATETIME:
 *         return Timestamp(util.get_value_1d(arr, i))             # <<<<<<<<<<<<<<
 *     else:
 *         return util.get_value_1d(arr, i)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":474
 *         return Timestamp(util.get_value_1d(arr, i))
 *     else:
 *         return util.get_value_1d(arr, i)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L7:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas.tslib.get_value_box", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_9get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_value_box (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__loc,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__loc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_value_box", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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_value_box") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __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_loc = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_value_box", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.get_value_box", __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[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_8get_value_box(__pyx_self, __pyx_v_arr, __pyx_v_loc);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":454
 * 
 * 
 * cpdef object get_value_box(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pf_6pandas_5tslib_8get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_box", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5tslib_get_value_box(__pyx_v_arr, __pyx_v_loc, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

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

/* "pandas/tslib.pyx":494
 * # Frequency inference
 * 
 * def unique_deltas(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */

static PyObject *__pyx_pf_6pandas_5tslib_10unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  kh_int64_t *__pyx_v_table;
  int __pyx_v_ret;
  PyObject *__pyx_v_uniques = 0;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique_deltas", 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_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __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/tslib.pyx":496
 * def unique_deltas(ndarray[int64_t] arr):
 *     cdef:
 *         Py_ssize_t i, n = len(arr)             # <<<<<<<<<<<<<<
 *         int64_t val
 *         khiter_t k
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":500
 *         khiter_t k
 *         kh_int64_t *table
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         list uniques = []
 * 
 */
  __pyx_v_ret = 0;

  /* "pandas/tslib.pyx":501
 *         kh_int64_t *table
 *         int ret = 0
 *         list uniques = []             # <<<<<<<<<<<<<<
 * 
 *     table = kh_init_int64()
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":503
 *         list uniques = []
 * 
 *     table = kh_init_int64()             # <<<<<<<<<<<<<<
 *     kh_resize_int64(table, 10)
 *     for i in range(n - 1):
 */
  __pyx_v_table = kh_init_int64();

  /* "pandas/tslib.pyx":504
 * 
 *     table = kh_init_int64()
 *     kh_resize_int64(table, 10)             # <<<<<<<<<<<<<<
 *     for i in range(n - 1):
 *         val = arr[i + 1] - arr[i]
 */
  kh_resize_int64(__pyx_v_table, 10);

  /* "pandas/tslib.pyx":505
 *     table = kh_init_int64()
 *     kh_resize_int64(table, 10)
 *     for i in range(n - 1):             # <<<<<<<<<<<<<<
 *         val = arr[i + 1] - arr[i]
 *         k = kh_get_int64(table, val)
 */
  __pyx_t_1 = (__pyx_v_n - 1);
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "pandas/tslib.pyx":506
 *     kh_resize_int64(table, 10)
 *     for i in range(n - 1):
 *         val = arr[i + 1] - arr[i]             # <<<<<<<<<<<<<<
 *         k = kh_get_int64(table, val)
 *         if k == table.n_buckets:
 */
    __pyx_t_4 = (__pyx_v_i + 1);
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides)));

    /* "pandas/tslib.pyx":507
 *     for i in range(n - 1):
 *         val = arr[i + 1] - arr[i]
 *         k = kh_get_int64(table, val)             # <<<<<<<<<<<<<<
 *         if k == table.n_buckets:
 *             kh_put_int64(table, val, &ret)
 */
    __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_v_val);

    /* "pandas/tslib.pyx":508
 *         val = arr[i + 1] - arr[i]
 *         k = kh_get_int64(table, val)
 *         if k == table.n_buckets:             # <<<<<<<<<<<<<<
 *             kh_put_int64(table, val, &ret)
 *             uniques.append(val)
 */
    __pyx_t_7 = (__pyx_v_k == __pyx_v_table->n_buckets);
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":509
 *         k = kh_get_int64(table, val)
 *         if k == table.n_buckets:
 *             kh_put_int64(table, val, &ret)             # <<<<<<<<<<<<<<
 *             uniques.append(val)
 *     kh_destroy_int64(table)
 */
      kh_put_int64(__pyx_v_table, __pyx_v_val, (&__pyx_v_ret));

      /* "pandas/tslib.pyx":510
 *         if k == table.n_buckets:
 *             kh_put_int64(table, val, &ret)
 *             uniques.append(val)             # <<<<<<<<<<<<<<
 *     kh_destroy_int64(table)
 * 
 */
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/tslib.pyx":511
 *             kh_put_int64(table, val, &ret)
 *             uniques.append(val)
 *     kh_destroy_int64(table)             # <<<<<<<<<<<<<<
 * 
 *     result = np.array(uniques, dtype=np.int64)
 */
  kh_destroy_int64(__pyx_v_table);

  /* "pandas/tslib.pyx":513
 *     kh_destroy_int64(table)
 * 
 *     result = np.array(uniques, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     result.sort()
 *     return result
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques));
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __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_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __pyx_v_result = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "pandas/tslib.pyx":514
 * 
 *     result = np.array(uniques, dtype=np.int64)
 *     result.sort()             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_12 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__sort); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "pandas/tslib.pyx":515
 *     result = np.array(uniques, dtype=np.int64)
 *     result.sort()
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.unique_deltas", __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_uniques);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":518
 * 
 * 
 * cdef inline bint _is_multiple(int64_t us, int64_t mult):             # <<<<<<<<<<<<<<
 *     return us % mult == 0
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_multiple(__pyx_t_5numpy_int64_t __pyx_v_us, __pyx_t_5numpy_int64_t __pyx_v_mult) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_multiple", 0);

  /* "pandas/tslib.pyx":519
 * 
 * cdef inline bint _is_multiple(int64_t us, int64_t mult):
 *     return us % mult == 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_mult == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_r = (__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_us, __pyx_v_mult) == 0);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_13apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_13apply_offset = {__Pyx_NAMESTR("apply_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_13apply_offset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_13apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  CYTHON_UNUSED PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_offset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__offset,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__offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply_offset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply_offset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_offset = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_offset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.apply_offset", __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[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_12apply_offset(__pyx_self, __pyx_v_values, __pyx_v_offset);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":522
 * 
 * 
 * def apply_offset(ndarray[object] values, object offset):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_5tslib_12apply_offset(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_offset) {
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED PyArrayObject *__pyx_v_new_values = 0;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_new_values;
  __Pyx_Buffer __pyx_pybuffer_new_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_offset", 0);
  __pyx_pybuffer_new_values.pybuffer.buf = NULL;
  __pyx_pybuffer_new_values.refcount = 0;
  __pyx_pybuffernd_new_values.data = NULL;
  __pyx_pybuffernd_new_values.rcbuffer = &__pyx_pybuffer_new_values;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __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/tslib.pyx":524
 * def apply_offset(ndarray[object] values, object offset):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] new_values
 *         object boxed
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":528
 *         object boxed
 * 
 *     result = np.empty(n, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *     new_values = result.view('i8')
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":529
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     new_values = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_new_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_new_values.diminfo[0].strides = __pyx_pybuffernd_new_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_values.diminfo[0].shape = __pyx_pybuffernd_new_values.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_new_values = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

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

/* "pandas/tslib.pyx":532
 * 
 * 
 * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1:             # <<<<<<<<<<<<<<
 *     if op == Py_EQ:
 *         return lhs == rhs
 */

static CYTHON_INLINE int __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_t_5numpy_int64_t __pyx_v_lhs, __pyx_t_5numpy_int64_t __pyx_v_rhs, int __pyx_v_op) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_cmp_scalar", 0);

  /* "pandas/tslib.pyx":533
 * 
 * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1:
 *     if op == Py_EQ:             # <<<<<<<<<<<<<<
 *         return lhs == rhs
 *     elif op == Py_NE:
 */
  __pyx_t_1 = (__pyx_v_op == Py_EQ);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":534
 * cdef inline bint _cmp_scalar(int64_t lhs, int64_t rhs, int op) except -1:
 *     if op == Py_EQ:
 *         return lhs == rhs             # <<<<<<<<<<<<<<
 *     elif op == Py_NE:
 *         return lhs != rhs
 */
    __pyx_r = (__pyx_v_lhs == __pyx_v_rhs);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":535
 *     if op == Py_EQ:
 *         return lhs == rhs
 *     elif op == Py_NE:             # <<<<<<<<<<<<<<
 *         return lhs != rhs
 *     elif op == Py_LT:
 */
  __pyx_t_1 = (__pyx_v_op == Py_NE);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":536
 *         return lhs == rhs
 *     elif op == Py_NE:
 *         return lhs != rhs             # <<<<<<<<<<<<<<
 *     elif op == Py_LT:
 *         return lhs < rhs
 */
    __pyx_r = (__pyx_v_lhs != __pyx_v_rhs);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":537
 *     elif op == Py_NE:
 *         return lhs != rhs
 *     elif op == Py_LT:             # <<<<<<<<<<<<<<
 *         return lhs < rhs
 *     elif op == Py_LE:
 */
  __pyx_t_1 = (__pyx_v_op == Py_LT);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":538
 *         return lhs != rhs
 *     elif op == Py_LT:
 *         return lhs < rhs             # <<<<<<<<<<<<<<
 *     elif op == Py_LE:
 *         return lhs <= rhs
 */
    __pyx_r = (__pyx_v_lhs < __pyx_v_rhs);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":539
 *     elif op == Py_LT:
 *         return lhs < rhs
 *     elif op == Py_LE:             # <<<<<<<<<<<<<<
 *         return lhs <= rhs
 *     elif op == Py_GT:
 */
  __pyx_t_1 = (__pyx_v_op == Py_LE);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":540
 *         return lhs < rhs
 *     elif op == Py_LE:
 *         return lhs <= rhs             # <<<<<<<<<<<<<<
 *     elif op == Py_GT:
 *         return lhs > rhs
 */
    __pyx_r = (__pyx_v_lhs <= __pyx_v_rhs);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":541
 *     elif op == Py_LE:
 *         return lhs <= rhs
 *     elif op == Py_GT:             # <<<<<<<<<<<<<<
 *         return lhs > rhs
 *     elif op == Py_GE:
 */
  __pyx_t_1 = (__pyx_v_op == Py_GT);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":542
 *         return lhs <= rhs
 *     elif op == Py_GT:
 *         return lhs > rhs             # <<<<<<<<<<<<<<
 *     elif op == Py_GE:
 *         return lhs >= rhs
 */
    __pyx_r = (__pyx_v_lhs > __pyx_v_rhs);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":543
 *     elif op == Py_GT:
 *         return lhs > rhs
 *     elif op == Py_GE:             # <<<<<<<<<<<<<<
 *         return lhs >= rhs
 * 
 */
  __pyx_t_1 = (__pyx_v_op == Py_GE);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":544
 *         return lhs > rhs
 *     elif op == Py_GE:
 *         return lhs >= rhs             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_r = (__pyx_v_lhs >= __pyx_v_rhs);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

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

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

/* "pandas/tslib.pyx":568
 *         object offset       # frequency reference
 * 
 *     def __hash__(_Timestamp self):             # <<<<<<<<<<<<<<
 *         if self.nanosecond:
 *             return hash(self.value)
 */

static Py_hash_t __pyx_pf_6pandas_5tslib_10_Timestamp___hash__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pandas/tslib.pyx":569
 * 
 *     def __hash__(_Timestamp self):
 *         if self.nanosecond:             # <<<<<<<<<<<<<<
 *             return hash(self.value)
 *         return datetime.__hash__(self)
 */
  if (__pyx_v_self->nanosecond) {

    /* "pandas/tslib.pyx":570
 *     def __hash__(_Timestamp self):
 *         if self.nanosecond:
 *             return hash(self.value)             # <<<<<<<<<<<<<<
 *         return datetime.__hash__(self)
 * 
 */
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":571
 *         if self.nanosecond:
 *             return hash(self.value)
 *         return datetime.__hash__(self)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(_Timestamp self, object other, int op):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____hash__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyInt_AsHash_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_hash_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib._Timestamp.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_3__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_5tslib__Timestamp, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":573
 *         return datetime.__hash__(self)
 * 
 *     def __richcmp__(_Timestamp self, object other, int op):             # <<<<<<<<<<<<<<
 *         cdef:
 *             _Timestamp ots
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_2__richcmp__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_ots = 0;
  int __pyx_v_ndim;
  PyDateTime_DateTime *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/tslib.pyx":578
 *             int ndim
 * 
 *         if isinstance(other, _Timestamp):             # <<<<<<<<<<<<<<
 *             if isinstance(other, _NaT):
 *                 return _cmp_nat_dt(other, self, _reverse_ops[op])
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":579
 * 
 *         if isinstance(other, _Timestamp):
 *             if isinstance(other, _NaT):             # <<<<<<<<<<<<<<
 *                 return _cmp_nat_dt(other, self, _reverse_ops[op])
 *             ots = other
 */
    __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/tslib.pyx":580
 *         if isinstance(other, _Timestamp):
 *             if isinstance(other, _NaT):
 *                 return _cmp_nat_dt(other, self, _reverse_ops[op])             # <<<<<<<<<<<<<<
 *             ots = other
 *         elif isinstance(other, datetime):
 */
      __Pyx_XDECREF(__pyx_r);
      if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_6pandas_5tslib__NaT))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __pyx_v_other;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6pandas_5tslib__cmp_nat_dt(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_t_1), __pyx_v_self, (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/tslib.pyx":581
 *             if isinstance(other, _NaT):
 *                 return _cmp_nat_dt(other, self, _reverse_ops[op])
 *             ots = other             # <<<<<<<<<<<<<<
 *         elif isinstance(other, datetime):
 *             if self.nanosecond == 0:
 */
    if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_other);
    __pyx_v_ots = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_other);
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":582
 *                 return _cmp_nat_dt(other, self, _reverse_ops[op])
 *             ots = other
 *         elif isinstance(other, datetime):             # <<<<<<<<<<<<<<
 *             if self.nanosecond == 0:
 *                 val = self.to_datetime()
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":583
 *             ots = other
 *         elif isinstance(other, datetime):
 *             if self.nanosecond == 0:             # <<<<<<<<<<<<<<
 *                 val = self.to_datetime()
 *                 return PyObject_RichCompareBool(val, other, op)
 */
    __pyx_t_2 = (__pyx_v_self->nanosecond == 0);
    if (__pyx_t_2) {

      /* "pandas/tslib.pyx":584
 *         elif isinstance(other, datetime):
 *             if self.nanosecond == 0:
 *                 val = self.to_datetime()             # <<<<<<<<<<<<<<
 *                 return PyObject_RichCompareBool(val, other, op)
 * 
 */
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_val = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":585
 *             if self.nanosecond == 0:
 *                 val = self.to_datetime()
 *                 return PyObject_RichCompareBool(val, other, op)             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_RichCompareBool(((PyObject *)__pyx_v_val), __pyx_v_other, __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/tslib.pyx":587
 *                 return PyObject_RichCompareBool(val, other, op)
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 ots = Timestamp(other)
 *             except ValueError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "pandas/tslib.pyx":588
 * 
 *             try:
 *                 ots = Timestamp(other)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 return self._compare_outside_nanorange(other, op)
 */
        __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_other);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_other);
        __Pyx_GIVEREF(__pyx_v_other);
        __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_5tslib__Timestamp))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __pyx_v_ots = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_t_7);
        __pyx_t_7 = 0;
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":589
 *             try:
 *                 ots = Timestamp(other)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 return self._compare_outside_nanorange(other, op)
 *         else:
 */
      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("pandas.tslib._Timestamp.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_1);

        /* "pandas/tslib.pyx":590
 *                 ots = Timestamp(other)
 *             except ValueError:
 *                 return self._compare_outside_nanorange(other, op)             # <<<<<<<<<<<<<<
 *         else:
 *             ndim = getattr(other, _NDIM_STRING, -1)
 */
        __Pyx_XDECREF(__pyx_r);
        if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_8datetime_datetime))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __pyx_t_9 = __pyx_v_other;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_compare_outside_nanorange(__pyx_v_self, ((PyDateTime_DateTime *)__pyx_t_9), __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L9_except_return;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L9_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L13_try_end:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":592
 *                 return self._compare_outside_nanorange(other, op)
 *         else:
 *             ndim = getattr(other, _NDIM_STRING, -1)             # <<<<<<<<<<<<<<
 * 
 *             if ndim != -1:
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_6pandas_5tslib__NDIM_STRING);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetAttr3(__pyx_v_other, __pyx_t_1, __pyx_int_neg_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_ndim = __pyx_t_8;

    /* "pandas/tslib.pyx":594
 *             ndim = getattr(other, _NDIM_STRING, -1)
 * 
 *             if ndim != -1:             # <<<<<<<<<<<<<<
 *                 if ndim == 0:
 *                     if isinstance(other, np.datetime64):
 */
    __pyx_t_2 = (__pyx_v_ndim != -1);
    if (__pyx_t_2) {

      /* "pandas/tslib.pyx":595
 * 
 *             if ndim != -1:
 *                 if ndim == 0:             # <<<<<<<<<<<<<<
 *                     if isinstance(other, np.datetime64):
 *                         other = Timestamp(other)
 */
      __pyx_t_2 = (__pyx_v_ndim == 0);
      if (__pyx_t_2) {

        /* "pandas/tslib.pyx":596
 *             if ndim != -1:
 *                 if ndim == 0:
 *                     if isinstance(other, np.datetime64):             # <<<<<<<<<<<<<<
 *                         other = Timestamp(other)
 *                     else:
 */
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":597
 *                 if ndim == 0:
 *                     if isinstance(other, np.datetime64):
 *                         other = Timestamp(other)             # <<<<<<<<<<<<<<
 *                     else:
 *                         raise TypeError('Cannot compare type %r with type %r' %
 */
          __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __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[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_other);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_other);
          __Pyx_GIVEREF(__pyx_v_other);
          __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_v_other);
          __pyx_v_other = __pyx_t_7;
          __pyx_t_7 = 0;
          goto __pyx_L18;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":600
 *                     else:
 *                         raise TypeError('Cannot compare type %r with type %r' %
 *                                         (type(self).__name__,             # <<<<<<<<<<<<<<
 *                                          type(other).__name__))
 *                 return PyObject_RichCompare(other, self, _reverse_ops[op])
 */
          __pyx_t_7 = PyObject_GetAttr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s____name__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);

          /* "pandas/tslib.pyx":601
 *                         raise TypeError('Cannot compare type %r with type %r' %
 *                                         (type(self).__name__,
 *                                          type(other).__name__))             # <<<<<<<<<<<<<<
 *                 return PyObject_RichCompare(other, self, _reverse_ops[op])
 *             else:
 */
          __pyx_t_6 = PyObject_GetAttr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s____name__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          __pyx_t_7 = 0;
          __pyx_t_6 = 0;
          __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
          __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
          __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_6));
          __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
          __pyx_t_6 = 0;
          __pyx_t_6 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_L18:;
        goto __pyx_L17;
      }
      __pyx_L17:;

      /* "pandas/tslib.pyx":602
 *                                         (type(self).__name__,
 *                                          type(other).__name__))
 *                 return PyObject_RichCompare(other, self, _reverse_ops[op])             # <<<<<<<<<<<<<<
 *             else:
 *                 if op == Py_EQ:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_other, ((PyObject *)__pyx_v_self), (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;
      goto __pyx_L16;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":604
 *                 return PyObject_RichCompare(other, self, _reverse_ops[op])
 *             else:
 *                 if op == Py_EQ:             # <<<<<<<<<<<<<<
 *                     return False
 *                 elif op == Py_NE:
 */
      __pyx_t_2 = (__pyx_v_op == Py_EQ);
      if (__pyx_t_2) {

        /* "pandas/tslib.pyx":605
 *             else:
 *                 if op == Py_EQ:
 *                     return False             # <<<<<<<<<<<<<<
 *                 elif op == Py_NE:
 *                     return True
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;
        goto __pyx_L19;
      }

      /* "pandas/tslib.pyx":606
 *                 if op == Py_EQ:
 *                     return False
 *                 elif op == Py_NE:             # <<<<<<<<<<<<<<
 *                     return True
 *                 raise TypeError('Cannot compare type %r with type %r' %
 */
      __pyx_t_2 = (__pyx_v_op == Py_NE);
      if (__pyx_t_2) {

        /* "pandas/tslib.pyx":607
 *                     return False
 *                 elif op == Py_NE:
 *                     return True             # <<<<<<<<<<<<<<
 *                 raise TypeError('Cannot compare type %r with type %r' %
 *                                 (type(self).__name__, type(other).__name__))
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;
        goto __pyx_L19;
      }
      __pyx_L19:;

      /* "pandas/tslib.pyx":609
 *                     return True
 *                 raise TypeError('Cannot compare type %r with type %r' %
 *                                 (type(self).__name__, type(other).__name__))             # <<<<<<<<<<<<<<
 * 
 *         self._assert_tzawareness_compat(other)
 */
      __pyx_t_6 = PyObject_GetAttr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s____name__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyObject_GetAttr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __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);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_6 = 0;
      __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_1));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
      __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L16:;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":611
 *                                 (type(self).__name__, type(other).__name__))
 * 
 *         self._assert_tzawareness_compat(other)             # <<<<<<<<<<<<<<
 *         return _cmp_scalar(self.value, ots.value, op)
 * 
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_assert_tzawareness_compat(__pyx_v_self, __pyx_v_other); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":612
 * 
 *         self._assert_tzawareness_compat(other)
 *         return _cmp_scalar(self.value, ots.value, op)             # <<<<<<<<<<<<<<
 * 
 *     cdef bint _compare_outside_nanorange(_Timestamp self, datetime other,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_6pandas_5tslib__cmp_scalar(__pyx_v_self->value, __pyx_v_ots->value, __pyx_v_op); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas.tslib._Timestamp.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ots);
  __Pyx_XDECREF((PyObject *)__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":614
 *         return _cmp_scalar(self.value, ots.value, op)
 * 
 *     cdef bint _compare_outside_nanorange(_Timestamp self, datetime other,             # <<<<<<<<<<<<<<
 *                                          int op) except -1:
 *         cdef datetime dtval = self.to_datetime()
 */

static int __pyx_f_6pandas_5tslib_10_Timestamp__compare_outside_nanorange(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyDateTime_DateTime *__pyx_v_other, int __pyx_v_op) {
  PyDateTime_DateTime *__pyx_v_dtval = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_compare_outside_nanorange", 0);

  /* "pandas/tslib.pyx":616
 *     cdef bint _compare_outside_nanorange(_Timestamp self, datetime other,
 *                                          int op) except -1:
 *         cdef datetime dtval = self.to_datetime()             # <<<<<<<<<<<<<<
 * 
 *         self._assert_tzawareness_compat(other)
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dtval = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":618
 *         cdef datetime dtval = self.to_datetime()
 * 
 *         self._assert_tzawareness_compat(other)             # <<<<<<<<<<<<<<
 * 
 *         if self.nanosecond == 0:
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_assert_tzawareness_compat(__pyx_v_self, ((PyObject *)__pyx_v_other)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":620
 *         self._assert_tzawareness_compat(other)
 * 
 *         if self.nanosecond == 0:             # <<<<<<<<<<<<<<
 *             return PyObject_RichCompareBool(dtval, other, op)
 *         else:
 */
  __pyx_t_3 = (__pyx_v_self->nanosecond == 0);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":621
 * 
 *         if self.nanosecond == 0:
 *             return PyObject_RichCompareBool(dtval, other, op)             # <<<<<<<<<<<<<<
 *         else:
 *             if op == Py_EQ:
 */
    __pyx_t_3 = PyObject_RichCompareBool(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), __pyx_v_op); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":623
 *             return PyObject_RichCompareBool(dtval, other, op)
 *         else:
 *             if op == Py_EQ:             # <<<<<<<<<<<<<<
 *                 return False
 *             elif op == Py_NE:
 */
    __pyx_t_3 = (__pyx_v_op == Py_EQ);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":624
 *         else:
 *             if op == Py_EQ:
 *                 return False             # <<<<<<<<<<<<<<
 *             elif op == Py_NE:
 *                 return True
 */
      __pyx_r = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }

    /* "pandas/tslib.pyx":625
 *             if op == Py_EQ:
 *                 return False
 *             elif op == Py_NE:             # <<<<<<<<<<<<<<
 *                 return True
 *             elif op == Py_LT:
 */
    __pyx_t_3 = (__pyx_v_op == Py_NE);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":626
 *                 return False
 *             elif op == Py_NE:
 *                 return True             # <<<<<<<<<<<<<<
 *             elif op == Py_LT:
 *                 return dtval < other
 */
      __pyx_r = 1;
      goto __pyx_L0;
      goto __pyx_L4;
    }

    /* "pandas/tslib.pyx":627
 *             elif op == Py_NE:
 *                 return True
 *             elif op == Py_LT:             # <<<<<<<<<<<<<<
 *                 return dtval < other
 *             elif op == Py_LE:
 */
    __pyx_t_3 = (__pyx_v_op == Py_LT);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":628
 *                 return True
 *             elif op == Py_LT:
 *                 return dtval < other             # <<<<<<<<<<<<<<
 *             elif op == Py_LE:
 *                 return dtval < other
 */
      __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      goto __pyx_L0;
      goto __pyx_L4;
    }

    /* "pandas/tslib.pyx":629
 *             elif op == Py_LT:
 *                 return dtval < other
 *             elif op == Py_LE:             # <<<<<<<<<<<<<<
 *                 return dtval < other
 *             elif op == Py_GT:
 */
    __pyx_t_3 = (__pyx_v_op == Py_LE);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":630
 *                 return dtval < other
 *             elif op == Py_LE:
 *                 return dtval < other             # <<<<<<<<<<<<<<
 *             elif op == Py_GT:
 *                 return dtval >= other
 */
      __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      goto __pyx_L0;
      goto __pyx_L4;
    }

    /* "pandas/tslib.pyx":631
 *             elif op == Py_LE:
 *                 return dtval < other
 *             elif op == Py_GT:             # <<<<<<<<<<<<<<
 *                 return dtval >= other
 *             elif op == Py_GE:
 */
    __pyx_t_3 = (__pyx_v_op == Py_GT);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":632
 *                 return dtval < other
 *             elif op == Py_GT:
 *                 return dtval >= other             # <<<<<<<<<<<<<<
 *             elif op == Py_GE:
 *                 return dtval >= other
 */
      __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      goto __pyx_L0;
      goto __pyx_L4;
    }

    /* "pandas/tslib.pyx":633
 *             elif op == Py_GT:
 *                 return dtval >= other
 *             elif op == Py_GE:             # <<<<<<<<<<<<<<
 *                 return dtval >= other
 * 
 */
    __pyx_t_3 = (__pyx_v_op == Py_GE);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":634
 *                 return dtval >= other
 *             elif op == Py_GE:
 *                 return dtval >= other             # <<<<<<<<<<<<<<
 * 
 *     cdef int _assert_tzawareness_compat(_Timestamp self,
 */
      __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_dtval), ((PyObject *)__pyx_v_other), Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas.tslib._Timestamp._compare_outside_nanorange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dtval);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":636
 *                 return dtval >= other
 * 
 *     cdef int _assert_tzawareness_compat(_Timestamp self,             # <<<<<<<<<<<<<<
 *                                         object other) except -1:
 *         if self.tzinfo is None:
 */

static int __pyx_f_6pandas_5tslib_10_Timestamp__assert_tzawareness_compat(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_assert_tzawareness_compat", 0);

  /* "pandas/tslib.pyx":638
 *     cdef int _assert_tzawareness_compat(_Timestamp self,
 *                                         object other) except -1:
 *         if self.tzinfo is None:             # <<<<<<<<<<<<<<
 *             if other.tzinfo is not None:
 *                 raise ValueError('Cannot compare tz-naive and tz-aware '
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":639
 *                                         object other) except -1:
 *         if self.tzinfo is None:
 *             if other.tzinfo is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Cannot compare tz-naive and tz-aware '
 *                                  'timestamps')
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "pandas/tslib.pyx":640
 *         if self.tzinfo is None:
 *             if other.tzinfo is not None:
 *                 raise ValueError('Cannot compare tz-naive and tz-aware '             # <<<<<<<<<<<<<<
 *                                  'timestamps')
 *         elif other.tzinfo is None:
 */
      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":642
 *                 raise ValueError('Cannot compare tz-naive and tz-aware '
 *                                  'timestamps')
 *         elif other.tzinfo is None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cannot compare tz-naive and tz-aware timestamps')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":643
 *                                  'timestamps')
 *         elif other.tzinfo is None:
 *             raise ValueError('Cannot compare tz-naive and tz-aware timestamps')             # <<<<<<<<<<<<<<
 * 
 *     cpdef datetime to_datetime(_Timestamp self):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas.tslib._Timestamp._assert_tzawareness_compat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":645
 *             raise ValueError('Cannot compare tz-naive and tz-aware timestamps')
 * 
 *     cpdef datetime to_datetime(_Timestamp self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             pandas_datetimestruct dts
 */

static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyDateTime_DateTime *__pyx_f_6pandas_5tslib_10_Timestamp_to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, int __pyx_skip_dispatch) {
  pandas_datetimestruct __pyx_v_dts;
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  pandas_datetimestruct __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__to_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __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_8datetime_datetime))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pandas/tslib.pyx":649
 *             pandas_datetimestruct dts
 *             _TSObject ts
 *         ts = convert_to_tsobject(self, self.tzinfo, None)             # <<<<<<<<<<<<<<
 *         dts = ts.dts
 *         return datetime(dts.year, dts.month, dts.day,
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = Py_None;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":650
 *             _TSObject ts
 *         ts = convert_to_tsobject(self, self.tzinfo, None)
 *         dts = ts.dts             # <<<<<<<<<<<<<<
 *         return datetime(dts.year, dts.month, dts.day,
 *                         dts.hour, dts.min, dts.sec,
 */
  __pyx_t_4 = __pyx_v_ts->dts;
  __pyx_v_dts = __pyx_t_4;

  /* "pandas/tslib.pyx":651
 *         ts = convert_to_tsobject(self, self.tzinfo, None)
 *         dts = ts.dts
 *         return datetime(dts.year, dts.month, dts.day,             # <<<<<<<<<<<<<<
 *                         dts.hour, dts.min, dts.sec,
 *                         dts.us, ts.tzinfo)
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/tslib.pyx":652
 *         dts = ts.dts
 *         return datetime(dts.year, dts.month, dts.day,
 *                         dts.hour, dts.min, dts.sec,             # <<<<<<<<<<<<<<
 *                         dts.us, ts.tzinfo)
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "pandas/tslib.pyx":653
 *         return datetime(dts.year, dts.month, dts.day,
 *                         dts.hour, dts.min, dts.sec,
 *                         dts.us, ts.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_ts->tzinfo);
  PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_ts->tzinfo);
  __Pyx_GIVEREF(__pyx_v_ts->tzinfo);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_8);
  __pyx_t_8 = 0;
  goto __pyx_L0;

  __pyx_r = ((PyDateTime_DateTime *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas.tslib._Timestamp.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ts);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":645
 *             raise ValueError('Cannot compare tz-naive and tz-aware timestamps')
 * 
 *     cpdef datetime to_datetime(_Timestamp self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             pandas_datetimestruct dts
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_4to_datetime(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":655
 *                         dts.us, ts.tzinfo)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t other_int
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  Py_ssize_t __pyx_v_other_int;
  PyObject *__pyx_v_nanos = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "pandas/tslib.pyx":658
 *         cdef Py_ssize_t other_int
 * 
 *         if is_timedelta64_object(other):             # <<<<<<<<<<<<<<
 *             other_int = other.astype('timedelta64[ns]').astype(int)
 *             return Timestamp(self.value + other_int, tz=self.tzinfo)
 */
  __pyx_t_1 = is_timedelta64_object(__pyx_v_other);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":659
 * 
 *         if is_timedelta64_object(other):
 *             other_int = other.astype('timedelta64[ns]').astype(int)             # <<<<<<<<<<<<<<
 *             return Timestamp(self.value + other_int, tz=self.tzinfo)
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_other_int = __pyx_t_5;

    /* "pandas/tslib.pyx":660
 *         if is_timedelta64_object(other):
 *             other_int = other.astype('timedelta64[ns]').astype(int)
 *             return Timestamp(self.value + other_int, tz=self.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         if is_integer_object(other):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_other_int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __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_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__tz), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":662
 *             return Timestamp(self.value + other_int, tz=self.tzinfo)
 * 
 *         if is_integer_object(other):             # <<<<<<<<<<<<<<
 *             if self.offset is None:
 *                 raise ValueError("Cannot add integral value to Timestamp "
 */
  __pyx_t_1 = is_integer_object(__pyx_v_other);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":663
 * 
 *         if is_integer_object(other):
 *             if self.offset is None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Cannot add integral value to Timestamp "
 *                                  "without offset.")
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__pyx_t_3 == Py_None);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":664
 *         if is_integer_object(other):
 *             if self.offset is None:
 *                 raise ValueError("Cannot add integral value to Timestamp "             # <<<<<<<<<<<<<<
 *                                  "without offset.")
 *             return Timestamp((self.offset * other).apply(self))
 */
      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/tslib.pyx":666
 *                 raise ValueError("Cannot add integral value to Timestamp "
 *                                  "without offset.")
 *             return Timestamp((self.offset * other).apply(self))             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(other, timedelta) or hasattr(other, 'delta'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__apply); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":668
 *             return Timestamp((self.offset * other).apply(self))
 * 
 *         if isinstance(other, timedelta) or hasattr(other, 'delta'):             # <<<<<<<<<<<<<<
 *             nanos = _delta_to_nanoseconds(other)
 *             return Timestamp(self.value + nanos, tz=self.tzinfo)
 */
  __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta));
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_other, __pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_7) {
    __pyx_t_4 = ((PyObject *)__pyx_n_s__delta);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_8 = PyObject_HasAttr(__pyx_v_other, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __pyx_t_8;
  } else {
    __pyx_t_9 = __pyx_t_7;
  }
  if (__pyx_t_9) {

    /* "pandas/tslib.pyx":669
 * 
 *         if isinstance(other, timedelta) or hasattr(other, 'delta'):
 *             nanos = _delta_to_nanoseconds(other)             # <<<<<<<<<<<<<<
 *             return Timestamp(self.value + nanos, tz=self.tzinfo)
 * 
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_40); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_nanos = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":670
 *         if isinstance(other, timedelta) or hasattr(other, 'delta'):
 *             nanos = _delta_to_nanoseconds(other)
 *             return Timestamp(self.value + nanos, tz=self.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         result = datetime.__add__(self, other)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_nanos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __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[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__tz), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/tslib.pyx":672
 *             return Timestamp(self.value + nanos, tz=self.tzinfo)
 * 
 *         result = datetime.__add__(self, other)             # <<<<<<<<<<<<<<
 *         if isinstance(result, datetime):
 *             result = Timestamp(result)
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____add__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_other);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other);
  __Pyx_GIVEREF(__pyx_v_other);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":673
 * 
 *         result = datetime.__add__(self, other)
 *         if isinstance(result, datetime):             # <<<<<<<<<<<<<<
 *             result = Timestamp(result)
 *             result.nanosecond = self.nanosecond
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_TypeCheck(__pyx_v_result, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "pandas/tslib.pyx":674
 *         result = datetime.__add__(self, other)
 *         if isinstance(result, datetime):
 *             result = Timestamp(result)             # <<<<<<<<<<<<<<
 *             result.nanosecond = self.nanosecond
 *         return result
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __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[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_result);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/tslib.pyx":675
 *         if isinstance(result, datetime):
 *             result = Timestamp(result)
 *             result.nanosecond = self.nanosecond             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyObject_SetAttr(__pyx_v_result, __pyx_n_s__nanosecond, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "pandas/tslib.pyx":676
 *             result = Timestamp(result)
 *             result.nanosecond = self.nanosecond
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib._Timestamp.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nanos);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":678
 *         return result
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         if is_integer_object(other):
 *             neg_other = -other
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_8__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_v_neg_other = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "pandas/tslib.pyx":679
 * 
 *     def __sub__(self, other):
 *         if is_integer_object(other):             # <<<<<<<<<<<<<<
 *             neg_other = -other
 *             return self + neg_other
 */
  __pyx_t_1 = is_integer_object(__pyx_v_other);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":680
 *     def __sub__(self, other):
 *         if is_integer_object(other):
 *             neg_other = -other             # <<<<<<<<<<<<<<
 *             return self + neg_other
 *         # This calling convention is required
 */
    __pyx_t_2 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_neg_other = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":681
 *         if is_integer_object(other):
 *             neg_other = -other
 *             return self + neg_other             # <<<<<<<<<<<<<<
 *         # This calling convention is required
 *         return datetime.__sub__(self, other)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyNumber_Add(__pyx_v_self, __pyx_v_neg_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":683
 *             return self + neg_other
 *         # This calling convention is required
 *         return datetime.__sub__(self, other)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get_field(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____sub__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_other);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_other);
  __Pyx_GIVEREF(__pyx_v_other);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib._Timestamp.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_neg_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":685
 *         return datetime.__sub__(self, other)
 * 
 *     cpdef _get_field(self, field):             # <<<<<<<<<<<<<<
 *         out = get_date_field(np.array([self.value], dtype=np.int64), field)
 *         return out[0]
 */

static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_10_Timestamp__get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_field", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___get_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pandas/tslib.pyx":686
 * 
 *     cpdef _get_field(self, field):
 *         out = get_date_field(np.array([self.value], dtype=np.int64), field)             # <<<<<<<<<<<<<<
 *         return out[0]
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_date_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __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_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __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_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __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_INCREF(__pyx_v_field);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_field);
  __Pyx_GIVEREF(__pyx_v_field);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_out = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":687
 *     cpdef _get_field(self, field):
 *         out = get_date_field(np.array([self.value], dtype=np.int64), field)
 *         return out[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_out, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib._Timestamp._get_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_field (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self), ((PyObject *)__pyx_v_field));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":685
 *         return datetime.__sub__(self, other)
 * 
 *     cpdef _get_field(self, field):             # <<<<<<<<<<<<<<
 *         out = get_date_field(np.array([self.value], dtype=np.int64), field)
 *         return out[0]
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10_get_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_get_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_5value___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":565
 * cdef class _Timestamp(datetime):
 *     cdef readonly:
 *         int64_t value, nanosecond             # <<<<<<<<<<<<<<
 *         object offset       # frequency reference
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_10nanosecond___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->nanosecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":566
 *     cdef readonly:
 *         int64_t value, nanosecond
 *         object offset       # frequency reference             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(_Timestamp self):
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6offset___get__(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->offset);
  __pyx_r = __pyx_v_self->offset;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":693
 * 
 * 
 * cdef inline bint is_timestamp(object o):             # <<<<<<<<<<<<<<
 *     return Py_TYPE(o) == ts_type # isinstance(o, Timestamp)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_5tslib_is_timestamp(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timestamp", 0);

  /* "pandas/tslib.pyx":694
 * 
 * cdef inline bint is_timestamp(object o):
 *     return Py_TYPE(o) == ts_type # isinstance(o, Timestamp)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = (Py_TYPE(__pyx_v_o) == __pyx_v_6pandas_5tslib_ts_type);
  goto __pyx_L0;

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

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

/* "pandas/tslib.pyx":709
 * cdef class _NaT(_Timestamp):
 * 
 *     def __hash__(_NaT self):             # <<<<<<<<<<<<<<
 *         # py3k needs this defined here
 *         return hash(self.value)
 */

static Py_hash_t __pyx_pf_6pandas_5tslib_4_NaT___hash__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "pandas/tslib.pyx":711
 *     def __hash__(_NaT self):
 *         # py3k needs this defined here
 *         return hash(self.value)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(_NaT self, object other, int op):
 */
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->__pyx_base.value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas.tslib._NaT.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_3__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_5tslib__NaT, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(((struct __pyx_obj_6pandas_5tslib__NaT *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":713
 *         return hash(self.value)
 * 
 *     def __richcmp__(_NaT self, object other, int op):             # <<<<<<<<<<<<<<
 *         cdef int ndim = getattr(other, 'ndim', -1)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_2__richcmp__(struct __pyx_obj_6pandas_5tslib__NaT *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  int __pyx_v_ndim;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/tslib.pyx":714
 * 
 *     def __richcmp__(_NaT self, object other, int op):
 *         cdef int ndim = getattr(other, 'ndim', -1)             # <<<<<<<<<<<<<<
 * 
 *         if ndim == -1:
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_s__ndim);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_other, __pyx_t_1, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ndim = __pyx_t_3;

  /* "pandas/tslib.pyx":716
 *         cdef int ndim = getattr(other, 'ndim', -1)
 * 
 *         if ndim == -1:             # <<<<<<<<<<<<<<
 *             return _nat_scalar_rules[op]
 * 
 */
  __pyx_t_4 = (__pyx_v_ndim == -1);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":717
 * 
 *         if ndim == -1:
 *             return _nat_scalar_rules[op]             # <<<<<<<<<<<<<<
 * 
 *         if ndim == 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_6pandas_5tslib__nat_scalar_rules[__pyx_v_op])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":719
 *             return _nat_scalar_rules[op]
 * 
 *         if ndim == 0:             # <<<<<<<<<<<<<<
 *             if isinstance(other, np.datetime64):
 *                 other = Timestamp(other)
 */
  __pyx_t_4 = (__pyx_v_ndim == 0);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":720
 * 
 *         if ndim == 0:
 *             if isinstance(other, np.datetime64):             # <<<<<<<<<<<<<<
 *                 other = Timestamp(other)
 *             else:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = PyObject_IsInstance(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":721
 *         if ndim == 0:
 *             if isinstance(other, np.datetime64):
 *                 other = Timestamp(other)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError('Cannot compare type %r with type %r' %
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_other);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other);
      __Pyx_GIVEREF(__pyx_v_other);
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_other);
      __pyx_v_other = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":724
 *             else:
 *                 raise TypeError('Cannot compare type %r with type %r' %
 *                                 (type(self).__name__, type(other).__name__))             # <<<<<<<<<<<<<<
 *         return PyObject_RichCompare(other, self, _reverse_ops[op])
 * 
 */
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s____name__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)Py_TYPE(__pyx_v_other)), __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __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);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_5 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":725
 *                 raise TypeError('Cannot compare type %r with type %r' %
 *                                 (type(self).__name__, type(other).__name__))
 *         return PyObject_RichCompare(other, self, _reverse_ops[op])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_other, ((PyObject *)__pyx_v_self), (__pyx_v_6pandas_5tslib__reverse_ops[__pyx_v_op])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib._NaT.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_15_delta_to_nanoseconds = {__Pyx_NAMESTR("_delta_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_15_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_delta_to_nanoseconds (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(__pyx_self, ((PyObject *)__pyx_v_delta));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":728
 * 
 * 
 * def _delta_to_nanoseconds(delta):             # <<<<<<<<<<<<<<
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta
 */

static PyObject *__pyx_pf_6pandas_5tslib_14_delta_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_delta) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_delta_to_nanoseconds", 0);
  __Pyx_INCREF(__pyx_v_delta);

  /* "pandas/tslib.pyx":729
 * 
 * def _delta_to_nanoseconds(delta):
 *     if hasattr(delta, 'delta'):             # <<<<<<<<<<<<<<
 *         delta = delta.delta
 *     if is_timedelta64_object(delta):
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_s__delta);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_HasAttr(__pyx_v_delta, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":730
 * def _delta_to_nanoseconds(delta):
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta             # <<<<<<<<<<<<<<
 *     if is_timedelta64_object(delta):
 *         return delta.astype("timedelta64[ns]").item()
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_delta, __pyx_n_s__delta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_delta);
    __pyx_v_delta = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":731
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta
 *     if is_timedelta64_object(delta):             # <<<<<<<<<<<<<<
 *         return delta.astype("timedelta64[ns]").item()
 *     if is_integer_object(delta):
 */
  __pyx_t_3 = is_timedelta64_object(__pyx_v_delta);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":732
 *         delta = delta.delta
 *     if is_timedelta64_object(delta):
 *         return delta.astype("timedelta64[ns]").item()             # <<<<<<<<<<<<<<
 *     if is_integer_object(delta):
 *         return delta
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_delta, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":733
 *     if is_timedelta64_object(delta):
 *         return delta.astype("timedelta64[ns]").item()
 *     if is_integer_object(delta):             # <<<<<<<<<<<<<<
 *         return delta
 *     return (delta.days * 24 * 60 * 60 * 1000000
 */
  __pyx_t_3 = is_integer_object(__pyx_v_delta);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":734
 *         return delta.astype("timedelta64[ns]").item()
 *     if is_integer_object(delta):
 *         return delta             # <<<<<<<<<<<<<<
 *     return (delta.days * 24 * 60 * 60 * 1000000
 *             + delta.seconds * 1000000
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_delta);
    __pyx_r = __pyx_v_delta;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":735
 *     if is_integer_object(delta):
 *         return delta
 *     return (delta.days * 24 * 60 * 60 * 1000000             # <<<<<<<<<<<<<<
 *             + delta.seconds * 1000000
 *             + delta.microseconds) * 1000
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/tslib.pyx":736
 *         return delta
 *     return (delta.days * 24 * 60 * 60 * 1000000
 *             + delta.seconds * 1000000             # <<<<<<<<<<<<<<
 *             + delta.microseconds) * 1000
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_delta, __pyx_n_s__days); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_int_24); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_int_60); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_int_1000000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_delta, __pyx_n_s__seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_int_1000000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __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_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":737
 *     return (delta.days * 24 * 60 * 60 * 1000000
 *             + delta.seconds * 1000000
 *             + delta.microseconds) * 1000             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_delta, __pyx_n_s__microseconds); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __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_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_int_1000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib._delta_to_nanoseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":748
 * 
 *     property value:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.value
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9_TSObject_5value___get__(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pandas/tslib.pyx":749
 *     property value:
 *         def __get__(self):
 *             return self.value             # <<<<<<<<<<<<<<
 * 
 * cpdef _get_utcoffset(tzinfo, obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":751
 *             return self.value
 * 
 * cpdef _get_utcoffset(tzinfo, obj):             # <<<<<<<<<<<<<<
 *     try:
 *         return tzinfo._utcoffset
 */

static PyObject *__pyx_pw_6pandas_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib__get_utcoffset(PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_utcoffset", 0);

  /* "pandas/tslib.pyx":752
 * 
 * cpdef _get_utcoffset(tzinfo, obj):
 *     try:             # <<<<<<<<<<<<<<
 *         return tzinfo._utcoffset
 *     except AttributeError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/tslib.pyx":753
 * cpdef _get_utcoffset(tzinfo, obj):
 *     try:
 *         return tzinfo._utcoffset             # <<<<<<<<<<<<<<
 *     except AttributeError:
 *         return tzinfo.utcoffset(obj)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(__pyx_v_tzinfo, __pyx_n_s___utcoffset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":754
 *     try:
 *         return tzinfo._utcoffset
 *     except AttributeError:             # <<<<<<<<<<<<<<
 *         return tzinfo.utcoffset(obj)
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "pandas/tslib.pyx":755
 *         return tzinfo._utcoffset
 *     except AttributeError:
 *         return tzinfo.utcoffset(obj)             # <<<<<<<<<<<<<<
 * 
 * # helper to extract datetime and int64 from several different possibilities
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_tzinfo, __pyx_n_s__utcoffset); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_obj);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
      __Pyx_GIVEREF(__pyx_v_obj);
      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __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_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_17_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tzinfo = 0;
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_utcoffset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tzinfo,&__pyx_n_s__obj,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__tzinfo)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_utcoffset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __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_utcoffset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __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_tzinfo = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_utcoffset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib._get_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_16_get_utcoffset(__pyx_self, __pyx_v_tzinfo, __pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":751
 *             return self.value
 * 
 * cpdef _get_utcoffset(tzinfo, obj):             # <<<<<<<<<<<<<<
 *     try:
 *         return tzinfo._utcoffset
 */

static PyObject *__pyx_pf_6pandas_5tslib_16_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_utcoffset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tzinfo, __pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":758
 * 
 * # helper to extract datetime and int64 from several different possibilities
 * cdef convert_to_tsobject(object ts, object tz, object unit):             # <<<<<<<<<<<<<<
 *     """
 *     Extract datetime and int64 from any of:
 */

static PyObject *__pyx_f_6pandas_5tslib_convert_to_tsobject(PyObject *__pyx_v_ts, PyObject *__pyx_v_tz, PyObject *__pyx_v_unit) {
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_obj = 0;
  CYTHON_UNUSED int __pyx_v_utc_convert;
  PyObject *__pyx_v_ts_offset = NULL;
  PyObject *__pyx_v_tz_offset = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __pyx_t_5numpy_int64_t __pyx_t_9;
  npy_datetime __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_to_tsobject", 0);
  __Pyx_INCREF(__pyx_v_ts);
  __Pyx_INCREF(__pyx_v_tz);

  /* "pandas/tslib.pyx":771
 *     cdef:
 *         _TSObject obj
 *         bint utc_convert = 1             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
  __pyx_v_utc_convert = 1;

  /* "pandas/tslib.pyx":773
 *         bint utc_convert = 1
 * 
 *     if tz is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)
 */
  __pyx_t_1 = (__pyx_v_tz != Py_None);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":774
 * 
 *     if tz is not None:
 *         if isinstance(tz, basestring):             # <<<<<<<<<<<<<<
 *             tz = pytz.timezone(tz)
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":775
 *     if tz is not None:
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)             # <<<<<<<<<<<<<<
 * 
 *     obj = _TSObject()
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timezone); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_tz);
      __pyx_v_tz = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":777
 *             tz = pytz.timezone(tz)
 * 
 *     obj = _TSObject()             # <<<<<<<<<<<<<<
 * 
 *     if ts is None or ts is NaT or ts is np_NaT:
 */
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__TSObject)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_obj = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":779
 *     obj = _TSObject()
 * 
 *     if ts is None or ts is NaT or ts is np_NaT:             # <<<<<<<<<<<<<<
 *         obj.value = NPY_NAT
 *     elif is_datetime64_object(ts):
 */
  __pyx_t_1 = (__pyx_v_ts == Py_None);
  if (!__pyx_t_1) {
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = (__pyx_v_ts == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np_NaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = (__pyx_v_ts == __pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_7;
  } else {
    __pyx_t_5 = __pyx_t_1;
  }
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":780
 * 
 *     if ts is None or ts is NaT or ts is np_NaT:
 *         obj.value = NPY_NAT             # <<<<<<<<<<<<<<
 *     elif is_datetime64_object(ts):
 *         obj.value = _get_datetime64_nanos(ts)
 */
    __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT;
    goto __pyx_L5;
  }

  /* "pandas/tslib.pyx":781
 *     if ts is None or ts is NaT or ts is np_NaT:
 *         obj.value = NPY_NAT
 *     elif is_datetime64_object(ts):             # <<<<<<<<<<<<<<
 *         obj.value = _get_datetime64_nanos(ts)
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 */
  __pyx_t_8 = is_datetime64_object(__pyx_v_ts);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":782
 *         obj.value = NPY_NAT
 *     elif is_datetime64_object(ts):
 *         obj.value = _get_datetime64_nanos(ts)             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 *     elif is_integer_object(ts):
 */
    __pyx_t_4 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_ts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_obj->value = __pyx_t_9;

    /* "pandas/tslib.pyx":783
 *     elif is_datetime64_object(ts):
 *         obj.value = _get_datetime64_nanos(ts)
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *     elif is_integer_object(ts):
 *         if ts == NPY_NAT:
 */
    pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts));
    goto __pyx_L5;
  }

  /* "pandas/tslib.pyx":784
 *         obj.value = _get_datetime64_nanos(ts)
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 *     elif is_integer_object(ts):             # <<<<<<<<<<<<<<
 *         if ts == NPY_NAT:
 *             obj.value = NPY_NAT
 */
  __pyx_t_8 = is_integer_object(__pyx_v_ts);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":785
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 *     elif is_integer_object(ts):
 *         if ts == NPY_NAT:             # <<<<<<<<<<<<<<
 *             obj.value = NPY_NAT
 *         else:
 */
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "pandas/tslib.pyx":786
 *     elif is_integer_object(ts):
 *         if ts == NPY_NAT:
 *             obj.value = NPY_NAT             # <<<<<<<<<<<<<<
 *         else:
 *             ts = ts * cast_from_unit(None,unit)
 */
      __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":788
 *             obj.value = NPY_NAT
 *         else:
 *             ts = ts * cast_from_unit(None,unit)             # <<<<<<<<<<<<<<
 *             obj.value = ts
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 */
      __pyx_t_2 = Py_None;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_9 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_t_2, __pyx_v_unit, 0); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyNumber_Multiply(__pyx_v_ts, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_ts);
      __pyx_v_ts = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":789
 *         else:
 *             ts = ts * cast_from_unit(None,unit)
 *             obj.value = ts             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 *     elif util.is_float_object(ts):
 */
      __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_obj->value = __pyx_t_9;

      /* "pandas/tslib.pyx":790
 *             ts = ts * cast_from_unit(None,unit)
 *             obj.value = ts
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *     elif util.is_float_object(ts):
 *         if ts != ts or ts == NPY_NAT:
 */
      __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts));
    }
    __pyx_L6:;
    goto __pyx_L5;
  }

  /* "pandas/tslib.pyx":791
 *             obj.value = ts
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 *     elif util.is_float_object(ts):             # <<<<<<<<<<<<<<
 *         if ts != ts or ts == NPY_NAT:
 *             obj.value = NPY_NAT
 */
  __pyx_t_8 = is_float_object(__pyx_v_ts);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":792
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 *     elif util.is_float_object(ts):
 *         if ts != ts or ts == NPY_NAT:             # <<<<<<<<<<<<<<
 *             obj.value = NPY_NAT
 *         else:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_ts, __pyx_v_ts, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __pyx_t_1;
    } else {
      __pyx_t_7 = __pyx_t_5;
    }
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":793
 *     elif util.is_float_object(ts):
 *         if ts != ts or ts == NPY_NAT:
 *             obj.value = NPY_NAT             # <<<<<<<<<<<<<<
 *         else:
 *             ts = cast_from_unit(ts,unit)
 */
      __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":795
 *             obj.value = NPY_NAT
 *         else:
 *             ts = cast_from_unit(ts,unit)             # <<<<<<<<<<<<<<
 *             obj.value = ts
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 */
      __pyx_t_9 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_v_ts);
      __pyx_v_ts = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":796
 *         else:
 *             ts = cast_from_unit(ts,unit)
 *             obj.value = ts             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 *     elif util.is_string_object(ts):
 */
      __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_obj->value = __pyx_t_9;

      /* "pandas/tslib.pyx":797
 *             ts = cast_from_unit(ts,unit)
 *             obj.value = ts
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *     elif util.is_string_object(ts):
 *         if ts in _nat_strings:
 */
      __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts));
    }
    __pyx_L7:;
    goto __pyx_L5;
  }

  /* "pandas/tslib.pyx":798
 *             obj.value = ts
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 *     elif util.is_string_object(ts):             # <<<<<<<<<<<<<<
 *         if ts in _nat_strings:
 *             obj.value = NPY_NAT
 */
  __pyx_t_8 = is_string_object(__pyx_v_ts);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":799
 *             pandas_datetime_to_datetimestruct(ts, PANDAS_FR_ns, &obj.dts)
 *     elif util.is_string_object(ts):
 *         if ts in _nat_strings:             # <<<<<<<<<<<<<<
 *             obj.value = NPY_NAT
 *         else:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___nat_strings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_ts, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":800
 *     elif util.is_string_object(ts):
 *         if ts in _nat_strings:
 *             obj.value = NPY_NAT             # <<<<<<<<<<<<<<
 *         else:
 *             _string_to_dts(ts, &obj.dts)
 */
      __pyx_v_obj->value = __pyx_v_6pandas_5tslib_NPY_NAT;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":802
 *             obj.value = NPY_NAT
 *         else:
 *             _string_to_dts(ts, &obj.dts)             # <<<<<<<<<<<<<<
 *             obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts)
 *     elif PyDateTime_Check(ts):
 */
      __pyx_t_2 = __pyx_f_8datetime__string_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":803
 *         else:
 *             _string_to_dts(ts, &obj.dts)
 *             obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *     elif PyDateTime_Check(ts):
 *         if tz is not None:
 */
      __pyx_v_obj->value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_obj->dts));
    }
    __pyx_L8:;
    goto __pyx_L5;
  }

  /* "pandas/tslib.pyx":804
 *             _string_to_dts(ts, &obj.dts)
 *             obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts)
 *     elif PyDateTime_Check(ts):             # <<<<<<<<<<<<<<
 *         if tz is not None:
 *             # sort of a temporary hack
 */
  __pyx_t_7 = PyDateTime_Check(__pyx_v_ts);
  if (__pyx_t_7) {

    /* "pandas/tslib.pyx":805
 *             obj.value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &obj.dts)
 *     elif PyDateTime_Check(ts):
 *         if tz is not None:             # <<<<<<<<<<<<<<
 *             # sort of a temporary hack
 *             if ts.tzinfo is not None:
 */
    __pyx_t_7 = (__pyx_v_tz != Py_None);
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":807
 *         if tz is not None:
 *             # sort of a temporary hack
 *             if ts.tzinfo is not None:             # <<<<<<<<<<<<<<
 *                 if (hasattr(tz, 'normalize') and
 *                     hasattr(ts.tzinfo, '_utcoffset')):
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = (__pyx_t_2 != Py_None);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_7) {

        /* "pandas/tslib.pyx":808
 *             # sort of a temporary hack
 *             if ts.tzinfo is not None:
 *                 if (hasattr(tz, 'normalize') and             # <<<<<<<<<<<<<<
 *                     hasattr(ts.tzinfo, '_utcoffset')):
 *                     ts = tz.normalize(ts)
 */
        __pyx_t_2 = ((PyObject *)__pyx_n_s__normalize);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_7 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_7) {

          /* "pandas/tslib.pyx":809
 *             if ts.tzinfo is not None:
 *                 if (hasattr(tz, 'normalize') and
 *                     hasattr(ts.tzinfo, '_utcoffset')):             # <<<<<<<<<<<<<<
 *                     ts = tz.normalize(ts)
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = ((PyObject *)__pyx_n_s___utcoffset);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = PyObject_HasAttr(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_1 = __pyx_t_5;
        } else {
          __pyx_t_1 = __pyx_t_7;
        }
        if (__pyx_t_1) {

          /* "pandas/tslib.pyx":810
 *                 if (hasattr(tz, 'normalize') and
 *                     hasattr(ts.tzinfo, '_utcoffset')):
 *                     ts = tz.normalize(ts)             # <<<<<<<<<<<<<<
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                     obj.tzinfo = ts.tzinfo
 */
          __pyx_t_4 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s__normalize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_ts);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ts);
          __Pyx_GIVEREF(__pyx_v_ts);
          __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_v_ts);
          __pyx_v_ts = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "pandas/tslib.pyx":811
 *                     hasattr(ts.tzinfo, '_utcoffset')):
 *                     ts = tz.normalize(ts)
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)             # <<<<<<<<<<<<<<
 *                     obj.tzinfo = ts.tzinfo
 *                 else: #tzoffset
 */
          __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts));

          /* "pandas/tslib.pyx":812
 *                     ts = tz.normalize(ts)
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                     obj.tzinfo = ts.tzinfo             # <<<<<<<<<<<<<<
 *                 else: #tzoffset
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)
 */
          __pyx_t_3 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_v_obj->tzinfo);
          __Pyx_DECREF(__pyx_v_obj->tzinfo);
          __pyx_v_obj->tzinfo = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L11;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":814
 *                     obj.tzinfo = ts.tzinfo
 *                 else: #tzoffset
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)             # <<<<<<<<<<<<<<
 *                     ts_offset = _get_utcoffset(ts.tzinfo, ts)
 *                     obj.value -= _delta_to_nanoseconds(ts_offset)
 */
          __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts));

          /* "pandas/tslib.pyx":815
 *                 else: #tzoffset
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                     ts_offset = _get_utcoffset(ts.tzinfo, ts)             # <<<<<<<<<<<<<<
 *                     obj.value -= _delta_to_nanoseconds(ts_offset)
 *                     tz_offset = _get_utcoffset(tz, ts)
 */
          __pyx_t_3 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_t_3, __pyx_v_ts, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_v_ts_offset = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "pandas/tslib.pyx":816
 *                     obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                     ts_offset = _get_utcoffset(ts.tzinfo, ts)
 *                     obj.value -= _delta_to_nanoseconds(ts_offset)             # <<<<<<<<<<<<<<
 *                     tz_offset = _get_utcoffset(tz, ts)
 *                     obj.value += _delta_to_nanoseconds(tz_offset)
 */
          __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_40); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __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[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_ts_offset);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ts_offset);
          __Pyx_GIVEREF(__pyx_v_ts_offset);
          __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
          __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __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_11); __pyx_t_11 = 0;
          __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_obj->value = __pyx_t_9;

          /* "pandas/tslib.pyx":817
 *                     ts_offset = _get_utcoffset(ts.tzinfo, ts)
 *                     obj.value -= _delta_to_nanoseconds(ts_offset)
 *                     tz_offset = _get_utcoffset(tz, ts)             # <<<<<<<<<<<<<<
 *                     obj.value += _delta_to_nanoseconds(tz_offset)
 *                     pandas_datetime_to_datetimestruct(obj.value,
 */
          __pyx_t_4 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, __pyx_v_ts, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_v_tz_offset = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "pandas/tslib.pyx":818
 *                     obj.value -= _delta_to_nanoseconds(ts_offset)
 *                     tz_offset = _get_utcoffset(tz, ts)
 *                     obj.value += _delta_to_nanoseconds(tz_offset)             # <<<<<<<<<<<<<<
 *                     pandas_datetime_to_datetimestruct(obj.value,
 *                                                       PANDAS_FR_ns, &obj.dts)
 */
          __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s_40); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __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[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_tz_offset);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz_offset);
          __Pyx_GIVEREF(__pyx_v_tz_offset);
          __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_obj->value = __pyx_t_9;

          /* "pandas/tslib.pyx":820
 *                     obj.value += _delta_to_nanoseconds(tz_offset)
 *                     pandas_datetime_to_datetimestruct(obj.value,
 *                                                       PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *                     obj.tzinfo = tz
 *             elif not _is_utc(tz):
 */
          pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts));

          /* "pandas/tslib.pyx":821
 *                     pandas_datetime_to_datetimestruct(obj.value,
 *                                                       PANDAS_FR_ns, &obj.dts)
 *                     obj.tzinfo = tz             # <<<<<<<<<<<<<<
 *             elif not _is_utc(tz):
 *                 try:
 */
          __Pyx_INCREF(__pyx_v_tz);
          __Pyx_GIVEREF(__pyx_v_tz);
          __Pyx_GOTREF(__pyx_v_obj->tzinfo);
          __Pyx_DECREF(__pyx_v_obj->tzinfo);
          __pyx_v_obj->tzinfo = __pyx_v_tz;
        }
        __pyx_L11:;
        goto __pyx_L10;
      }

      /* "pandas/tslib.pyx":822
 *                                                       PANDAS_FR_ns, &obj.dts)
 *                     obj.tzinfo = tz
 *             elif not _is_utc(tz):             # <<<<<<<<<<<<<<
 *                 try:
 *                     ts = tz.localize(ts)
 */
      __pyx_t_1 = (!__pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz));
      if (__pyx_t_1) {

        /* "pandas/tslib.pyx":823
 *                     obj.tzinfo = tz
 *             elif not _is_utc(tz):
 *                 try:             # <<<<<<<<<<<<<<
 *                     ts = tz.localize(ts)
 *                 except AttributeError:
 */
        {
          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {

            /* "pandas/tslib.pyx":824
 *             elif not _is_utc(tz):
 *                 try:
 *                     ts = tz.localize(ts)             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     ts = ts.replace(tzinfo=tz)
 */
            __pyx_t_2 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s__localize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_v_ts);
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ts);
            __Pyx_GIVEREF(__pyx_v_ts);
            __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_v_ts);
            __pyx_v_ts = __pyx_t_4;
            __pyx_t_4 = 0;
          }
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L19_try_end;
          __pyx_L12_error:;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pandas/tslib.pyx":825
 *                 try:
 *                     ts = tz.localize(ts)
 *                 except AttributeError:             # <<<<<<<<<<<<<<
 *                     ts = ts.replace(tzinfo=tz)
 *                 obj.value = _pydatetime_to_dts(ts, &obj.dts)
 */
          __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
          if (__pyx_t_8) {
            __Pyx_AddTraceback("pandas.tslib.convert_to_tsobject", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GOTREF(__pyx_t_2);

            /* "pandas/tslib.pyx":826
 *                     ts = tz.localize(ts)
 *                 except AttributeError:
 *                     ts = ts.replace(tzinfo=tz)             # <<<<<<<<<<<<<<
 *                 obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                 obj.tzinfo = ts.tzinfo
 */
            __pyx_t_11 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__replace); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(((PyObject *)__pyx_t_15));
            if (PyDict_SetItem(__pyx_t_15, ((PyObject *)__pyx_n_s__tzinfo), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __pyx_t_16 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_v_ts);
            __pyx_v_ts = __pyx_t_16;
            __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L13_exception_handled;
          }
          __pyx_L14_except_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L13_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_L19_try_end:;
        }

        /* "pandas/tslib.pyx":827
 *                 except AttributeError:
 *                     ts = ts.replace(tzinfo=tz)
 *                 obj.value = _pydatetime_to_dts(ts, &obj.dts)             # <<<<<<<<<<<<<<
 *                 obj.tzinfo = ts.tzinfo
 *             else:
 */
        __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts));

        /* "pandas/tslib.pyx":828
 *                     ts = ts.replace(tzinfo=tz)
 *                 obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                 obj.tzinfo = ts.tzinfo             # <<<<<<<<<<<<<<
 *             else:
 *                 # UTC
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_obj->tzinfo);
        __Pyx_DECREF(__pyx_v_obj->tzinfo);
        __pyx_v_obj->tzinfo = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":831
 *             else:
 *                 # UTC
 *                 obj.value = _pydatetime_to_dts(ts, &obj.dts)             # <<<<<<<<<<<<<<
 *                 obj.tzinfo = pytz.utc
 *         else:
 */
        __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts));

        /* "pandas/tslib.pyx":832
 *                 # UTC
 *                 obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *                 obj.tzinfo = pytz.utc             # <<<<<<<<<<<<<<
 *         else:
 *             obj.value = _pydatetime_to_dts(ts, &obj.dts)
 */
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__utc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_v_obj->tzinfo);
        __Pyx_DECREF(__pyx_v_obj->tzinfo);
        __pyx_v_obj->tzinfo = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L10:;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":834
 *                 obj.tzinfo = pytz.utc
 *         else:
 *             obj.value = _pydatetime_to_dts(ts, &obj.dts)             # <<<<<<<<<<<<<<
 *             obj.tzinfo = ts.tzinfo
 * 
 */
      __pyx_v_obj->value = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_ts, (&__pyx_v_obj->dts));

      /* "pandas/tslib.pyx":835
 *         else:
 *             obj.value = _pydatetime_to_dts(ts, &obj.dts)
 *             obj.tzinfo = ts.tzinfo             # <<<<<<<<<<<<<<
 * 
 *         if obj.tzinfo is not None and not _is_utc(obj.tzinfo):
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_obj->tzinfo);
      __Pyx_DECREF(__pyx_v_obj->tzinfo);
      __pyx_v_obj->tzinfo = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L9:;

    /* "pandas/tslib.pyx":837
 *             obj.tzinfo = ts.tzinfo
 * 
 *         if obj.tzinfo is not None and not _is_utc(obj.tzinfo):             # <<<<<<<<<<<<<<
 *             offset = _get_utcoffset(obj.tzinfo, ts)
 *             obj.value -= _delta_to_nanoseconds(offset)
 */
    __pyx_t_1 = (__pyx_v_obj->tzinfo != Py_None);
    if (__pyx_t_1) {
      __pyx_t_3 = __pyx_v_obj->tzinfo;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = (!__pyx_f_6pandas_5tslib__is_utc(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __pyx_t_7;
    } else {
      __pyx_t_5 = __pyx_t_1;
    }
    if (__pyx_t_5) {

      /* "pandas/tslib.pyx":838
 * 
 *         if obj.tzinfo is not None and not _is_utc(obj.tzinfo):
 *             offset = _get_utcoffset(obj.tzinfo, ts)             # <<<<<<<<<<<<<<
 *             obj.value -= _delta_to_nanoseconds(offset)
 * 
 */
      __pyx_t_3 = __pyx_v_obj->tzinfo;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_t_3, __pyx_v_ts, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_offset = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":839
 *         if obj.tzinfo is not None and not _is_utc(obj.tzinfo):
 *             offset = _get_utcoffset(obj.tzinfo, ts)
 *             obj.value -= _delta_to_nanoseconds(offset)             # <<<<<<<<<<<<<<
 * 
 *         if is_timestamp(ts):
 */
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_40); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __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[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_offset);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_offset);
      __Pyx_GIVEREF(__pyx_v_offset);
      __pyx_t_16 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __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_16); __pyx_t_16 = 0;
      __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_obj->value = __pyx_t_9;
      goto __pyx_L22;
    }
    __pyx_L22:;

    /* "pandas/tslib.pyx":841
 *             obj.value -= _delta_to_nanoseconds(offset)
 * 
 *         if is_timestamp(ts):             # <<<<<<<<<<<<<<
 *             obj.value += ts.nanosecond
 *         _check_dts_bounds(&obj.dts)
 */
    __pyx_t_5 = __pyx_f_6pandas_5tslib_is_timestamp(__pyx_v_ts);
    if (__pyx_t_5) {

      /* "pandas/tslib.pyx":842
 * 
 *         if is_timestamp(ts):
 *             obj.value += ts.nanosecond             # <<<<<<<<<<<<<<
 *         _check_dts_bounds(&obj.dts)
 *         return obj
 */
      __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_16 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_9 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_9 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_obj->value = __pyx_t_9;
      goto __pyx_L23;
    }
    __pyx_L23:;

    /* "pandas/tslib.pyx":843
 *         if is_timestamp(ts):
 *             obj.value += ts.nanosecond
 *         _check_dts_bounds(&obj.dts)             # <<<<<<<<<<<<<<
 *         return obj
 *     elif PyDate_Check(ts):
 */
    __pyx_t_2 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":844
 *             obj.value += ts.nanosecond
 *         _check_dts_bounds(&obj.dts)
 *         return obj             # <<<<<<<<<<<<<<
 *     elif PyDate_Check(ts):
 *         # Keep the converter same as PyDateTime's
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyObject *)__pyx_v_obj);
    goto __pyx_L0;
    goto __pyx_L5;
  }

  /* "pandas/tslib.pyx":845
 *         _check_dts_bounds(&obj.dts)
 *         return obj
 *     elif PyDate_Check(ts):             # <<<<<<<<<<<<<<
 *         # Keep the converter same as PyDateTime's
 *         ts = datetime.combine(ts, datetime_time())
 */
  __pyx_t_5 = PyDate_Check(__pyx_v_ts);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":847
 *     elif PyDate_Check(ts):
 *         # Keep the converter same as PyDateTime's
 *         ts = datetime.combine(ts, datetime_time())             # <<<<<<<<<<<<<<
 *         return convert_to_tsobject(ts, tz, None)
 *     else:
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s__combine); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_4 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_v_ts);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_ts);
    __Pyx_GIVEREF(__pyx_v_ts);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_v_ts);
    __pyx_v_ts = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":848
 *         # Keep the converter same as PyDateTime's
 *         ts = datetime.combine(ts, datetime_time())
 *         return convert_to_tsobject(ts, tz, None)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Could not construct Timestamp from argument %s" %
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = Py_None;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_16 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_ts, __pyx_v_tz, __pyx_t_4); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_16;
    __pyx_t_16 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":851
 *     else:
 *         raise ValueError("Could not construct Timestamp from argument %s" %
 *                          type(ts))             # <<<<<<<<<<<<<<
 * 
 *     if obj.value != NPY_NAT:
 */
    __pyx_t_16 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_16));
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_16));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_16));
    __pyx_t_16 = 0;
    __pyx_t_16 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_16, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":853
 *                          type(ts))
 * 
 *     if obj.value != NPY_NAT:             # <<<<<<<<<<<<<<
 *         _check_dts_bounds(&obj.dts)
 * 
 */
  __pyx_t_5 = (__pyx_v_obj->value != __pyx_v_6pandas_5tslib_NPY_NAT);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":854
 * 
 *     if obj.value != NPY_NAT:
 *         _check_dts_bounds(&obj.dts)             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
    __pyx_t_16 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_obj->dts)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    goto __pyx_L24;
  }
  __pyx_L24:;

  /* "pandas/tslib.pyx":856
 *         _check_dts_bounds(&obj.dts)
 * 
 *     if tz is not None:             # <<<<<<<<<<<<<<
 *         _localize_tso(obj, tz)
 * 
 */
  __pyx_t_5 = (__pyx_v_tz != Py_None);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":857
 * 
 *     if tz is not None:
 *         _localize_tso(obj, tz)             # <<<<<<<<<<<<<<
 * 
 *     return obj
 */
    __pyx_f_6pandas_5tslib__localize_tso(__pyx_v_obj, __pyx_v_tz);
    goto __pyx_L25;
  }
  __pyx_L25:;

  /* "pandas/tslib.pyx":859
 *         _localize_tso(obj, tz)
 * 
 *     return obj             # <<<<<<<<<<<<<<
 * 
 * cdef inline void _localize_tso(_TSObject obj, object tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_obj));
  __pyx_r = ((PyObject *)__pyx_v_obj);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("pandas.tslib.convert_to_tsobject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_ts_offset);
  __Pyx_XDECREF(__pyx_v_tz_offset);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_ts);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":861
 *     return obj
 * 
 * cdef inline void _localize_tso(_TSObject obj, object tz):             # <<<<<<<<<<<<<<
 *     if _is_utc(tz):
 *         obj.tzinfo = tz
 */

static CYTHON_INLINE void __pyx_f_6pandas_5tslib__localize_tso(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_obj, PyObject *__pyx_v_tz) {
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_v_trans = NULL;
  PyObject *__pyx_v_deltas = NULL;
  PyObject *__pyx_v_pos = NULL;
  PyObject *__pyx_v_inf = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  npy_datetime __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_localize_tso", 0);

  /* "pandas/tslib.pyx":862
 * 
 * cdef inline void _localize_tso(_TSObject obj, object tz):
 *     if _is_utc(tz):             # <<<<<<<<<<<<<<
 *         obj.tzinfo = tz
 *     elif _is_tzlocal(tz):
 */
  __pyx_t_1 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":863
 * cdef inline void _localize_tso(_TSObject obj, object tz):
 *     if _is_utc(tz):
 *         obj.tzinfo = tz             # <<<<<<<<<<<<<<
 *     elif _is_tzlocal(tz):
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 */
    __Pyx_INCREF(__pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __Pyx_GOTREF(__pyx_v_obj->tzinfo);
    __Pyx_DECREF(__pyx_v_obj->tzinfo);
    __pyx_v_obj->tzinfo = __pyx_v_tz;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":864
 *     if _is_utc(tz):
 *         obj.tzinfo = tz
 *     elif _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 *         dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour,
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":865
 *         obj.tzinfo = tz
 *     elif _is_tzlocal(tz):
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *         dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour,
 *                       obj.dts.min, obj.dts.sec, obj.dts.us, tz)
 */
    pandas_datetime_to_datetimestruct(__pyx_v_obj->value, PANDAS_FR_ns, (&__pyx_v_obj->dts));

    /* "pandas/tslib.pyx":866
 *     elif _is_tzlocal(tz):
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 *         dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour,             # <<<<<<<<<<<<<<
 *                       obj.dts.min, obj.dts.sec, obj.dts.us, tz)
 *         delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 */
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);

    /* "pandas/tslib.pyx":867
 *         pandas_datetime_to_datetimestruct(obj.value, PANDAS_FR_ns, &obj.dts)
 *         dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour,
 *                       obj.dts.min, obj.dts.sec, obj.dts.us, tz)             # <<<<<<<<<<<<<<
 *         delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *         pandas_datetime_to_datetimestruct(obj.value + delta,
 */
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.sec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_obj->dts.us); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_2 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "pandas/tslib.pyx":868
 *         dt = datetime(obj.dts.year, obj.dts.month, obj.dts.day, obj.dts.hour,
 *                       obj.dts.min, obj.dts.sec, obj.dts.us, tz)
 *         delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(obj.value + delta,
 *                                           PANDAS_FR_ns, &obj.dts)
 */
    __pyx_t_8 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Multiply(__pyx_t_9, __pyx_int_1000000000); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_delta = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "pandas/tslib.pyx":869
 *                       obj.dts.min, obj.dts.sec, obj.dts.us, tz)
 *         delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *         pandas_datetime_to_datetimestruct(obj.value + delta,             # <<<<<<<<<<<<<<
 *                                           PANDAS_FR_ns, &obj.dts)
 *         obj.tzinfo = tz
 */
    __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_v_delta); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":870
 *         delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *         pandas_datetime_to_datetimestruct(obj.value + delta,
 *                                           PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *         obj.tzinfo = tz
 *     else:
 */
    pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts));

    /* "pandas/tslib.pyx":871
 *         pandas_datetime_to_datetimestruct(obj.value + delta,
 *                                           PANDAS_FR_ns, &obj.dts)
 *         obj.tzinfo = tz             # <<<<<<<<<<<<<<
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 */
    __Pyx_INCREF(__pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __Pyx_GOTREF(__pyx_v_obj->tzinfo);
    __Pyx_DECREF(__pyx_v_obj->tzinfo);
    __pyx_v_obj->tzinfo = __pyx_v_tz;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":874
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)             # <<<<<<<<<<<<<<
 *         deltas = _get_deltas(tz)
 *         pos = trans.searchsorted(obj.value, side='right') - 1
 */
    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_trans = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "pandas/tslib.pyx":875
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)             # <<<<<<<<<<<<<<
 *         pos = trans.searchsorted(obj.value, side='right') - 1
 * 
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __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[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_deltas = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":876
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)
 *         pos = trans.searchsorted(obj.value, side='right') - 1             # <<<<<<<<<<<<<<
 * 
 *         # statictzinfo
 */
    __pyx_t_9 = PyObject_GetAttr(__pyx_v_trans, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __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 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Subtract(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_pos = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "pandas/tslib.pyx":879
 * 
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[0],
 *                                               PANDAS_FR_ns, &obj.dts)
 */
    __pyx_t_8 = ((PyObject *)__pyx_n_s___transition_info);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_1 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_8); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = (!__pyx_t_1);
    if (__pyx_t_11) {

      /* "pandas/tslib.pyx":880
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[0],             # <<<<<<<<<<<<<<
 *                                               PANDAS_FR_ns, &obj.dts)
 *             obj.tzinfo = tz
 */
      __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_deltas, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_7); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":881
 *         if not hasattr(tz, '_transition_info'):
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[0],
 *                                               PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *             obj.tzinfo = tz
 *         else:
 */
      pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts));

      /* "pandas/tslib.pyx":882
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[0],
 *                                               PANDAS_FR_ns, &obj.dts)
 *             obj.tzinfo = tz             # <<<<<<<<<<<<<<
 *         else:
 *             inf = tz._transition_info[pos]
 */
      __Pyx_INCREF(__pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __Pyx_GOTREF(__pyx_v_obj->tzinfo);
      __Pyx_DECREF(__pyx_v_obj->tzinfo);
      __pyx_v_obj->tzinfo = __pyx_v_tz;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":884
 *             obj.tzinfo = tz
 *         else:
 *             inf = tz._transition_info[pos]             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[pos],
 *                                               PANDAS_FR_ns, &obj.dts)
 */
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_v_pos); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_inf = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/tslib.pyx":885
 *         else:
 *             inf = tz._transition_info[pos]
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[pos],             # <<<<<<<<<<<<<<
 *                                               PANDAS_FR_ns, &obj.dts)
 *             obj.tzinfo = tz._tzinfos[inf]
 */
      __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_obj->value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_Add(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __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_t_10 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_10 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pandas/tslib.pyx":886
 *             inf = tz._transition_info[pos]
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[pos],
 *                                               PANDAS_FR_ns, &obj.dts)             # <<<<<<<<<<<<<<
 *             obj.tzinfo = tz._tzinfos[inf]
 * 
 */
      pandas_datetime_to_datetimestruct(__pyx_t_10, PANDAS_FR_ns, (&__pyx_v_obj->dts));

      /* "pandas/tslib.pyx":887
 *             pandas_datetime_to_datetimestruct(obj.value + deltas[pos],
 *                                               PANDAS_FR_ns, &obj.dts)
 *             obj.tzinfo = tz._tzinfos[inf]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___tzinfos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_v_inf); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GIVEREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_v_obj->tzinfo);
      __Pyx_DECREF(__pyx_v_obj->tzinfo);
      __pyx_v_obj->tzinfo = __pyx_t_7;
      __pyx_t_7 = 0;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_WriteUnraisable("pandas.tslib._localize_tso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_trans);
  __Pyx_XDECREF(__pyx_v_deltas);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_v_inf);
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_19get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_19get_timezone = {__Pyx_NAMESTR("get_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_19get_timezone, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_19get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_timezone (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_18get_timezone(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":890
 * 
 * 
 * def get_timezone(tz):             # <<<<<<<<<<<<<<
 *     return _get_zone(tz)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_18get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_timezone", 0);

  /* "pandas/tslib.pyx":891
 * 
 * def get_timezone(tz):
 *     return _get_zone(tz)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _is_utc(object tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":893
 *     return _get_zone(tz)
 * 
 * cdef inline bint _is_utc(object tz):             # <<<<<<<<<<<<<<
 *     return tz is UTC or isinstance(tz, _du_utc)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_5tslib__is_utc(PyObject *__pyx_v_tz) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_utc", 0);

  /* "pandas/tslib.pyx":894
 * 
 * cdef inline bint _is_utc(object tz):
 *     return tz is UTC or isinstance(tz, _du_utc)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _get_zone(object tz):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__UTC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_v_tz == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___du_utc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("pandas.tslib._is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":896
 *     return tz is UTC or isinstance(tz, _du_utc)
 * 
 * cdef inline object _get_zone(object tz):             # <<<<<<<<<<<<<<
 *     if _is_utc(tz):
 *         return 'UTC'
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_zone(PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_zone = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_zone", 0);

  /* "pandas/tslib.pyx":897
 * 
 * cdef inline object _get_zone(object tz):
 *     if _is_utc(tz):             # <<<<<<<<<<<<<<
 *         return 'UTC'
 *     else:
 */
  __pyx_t_1 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":898
 * cdef inline object _get_zone(object tz):
 *     if _is_utc(tz):
 *         return 'UTC'             # <<<<<<<<<<<<<<
 *     else:
 *         try:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__UTC));
    __pyx_r = ((PyObject *)__pyx_n_s__UTC);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":900
 *         return 'UTC'
 *     else:
 *         try:             # <<<<<<<<<<<<<<
 *             zone = tz.zone
 *             if zone is None:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "pandas/tslib.pyx":901
 *     else:
 *         try:
 *             zone = tz.zone             # <<<<<<<<<<<<<<
 *             if zone is None:
 *                 return tz
 */
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s__zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_zone = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "pandas/tslib.pyx":902
 *         try:
 *             zone = tz.zone
 *             if zone is None:             # <<<<<<<<<<<<<<
 *                 return tz
 *             return zone
 */
        __pyx_t_1 = (__pyx_v_zone == Py_None);
        if (__pyx_t_1) {

          /* "pandas/tslib.pyx":903
 *             zone = tz.zone
 *             if zone is None:
 *                 return tz             # <<<<<<<<<<<<<<
 *             return zone
 *         except AttributeError:
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_tz);
          __pyx_r = __pyx_v_tz;
          goto __pyx_L8_try_return;
          goto __pyx_L12;
        }
        __pyx_L12:;

        /* "pandas/tslib.pyx":904
 *             if zone is None:
 *                 return tz
 *             return zone             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return tz
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_zone);
        __pyx_r = __pyx_v_zone;
        goto __pyx_L8_try_return;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L11_try_end;
      __pyx_L8_try_return:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L0;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/tslib.pyx":905
 *                 return tz
 *             return zone
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return tz
 * 
 */
      __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("pandas.tslib._get_zone", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_8);

        /* "pandas/tslib.pyx":906
 *             return zone
 *         except AttributeError:
 *             return tz             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_tz);
        __pyx_r = __pyx_v_tz;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L0;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L11_try_end:;
    }
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pandas.tslib._get_zone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_zone);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":912
 *     pass
 * 
 * cdef inline _check_dts_bounds(pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     cdef:
 *         bint error = False
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__check_dts_bounds(pandas_datetimestruct *__pyx_v_dts) {
  int __pyx_v_error;
  PyObject *__pyx_v_fmt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_dts_bounds", 0);

  /* "pandas/tslib.pyx":914
 * cdef inline _check_dts_bounds(pandas_datetimestruct *dts):
 *     cdef:
 *         bint error = False             # <<<<<<<<<<<<<<
 * 
 *     if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1:
 */
  __pyx_v_error = 0;

  /* "pandas/tslib.pyx":916
 *         bint error = False
 * 
 *     if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1:             # <<<<<<<<<<<<<<
 *         error = True
 *     elif (
 */
  __pyx_t_1 = (__pyx_v_dts->year <= 1677);
  if (__pyx_t_1) {
    __pyx_t_2 = (cmp_pandas_datetimestruct(__pyx_v_dts, (&__pyx_v_6pandas_5tslib__NS_MIN_DTS)) == -1);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":917
 * 
 *     if dts.year <= 1677 and cmp_pandas_datetimestruct(dts, &_NS_MIN_DTS) == -1:
 *         error = True             # <<<<<<<<<<<<<<
 *     elif (
 *             dts.year >= 2262 and
 */
    __pyx_v_error = 1;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":919
 *         error = True
 *     elif (
 *             dts.year >= 2262 and             # <<<<<<<<<<<<<<
 *             cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1):
 *         error = True
 */
  __pyx_t_3 = (__pyx_v_dts->year >= 2262);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":920
 *     elif (
 *             dts.year >= 2262 and
 *             cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1):             # <<<<<<<<<<<<<<
 *         error = True
 * 
 */
    __pyx_t_1 = (cmp_pandas_datetimestruct(__pyx_v_dts, (&__pyx_v_6pandas_5tslib__NS_MAX_DTS)) == 1);
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":921
 *             dts.year >= 2262 and
 *             cmp_pandas_datetimestruct(dts, &_NS_MAX_DTS) == 1):
 *         error = True             # <<<<<<<<<<<<<<
 * 
 *     if error:
 */
    __pyx_v_error = 1;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":923
 *         error = True
 * 
 *     if error:             # <<<<<<<<<<<<<<
 *         fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month,
 *                                                dts.day, dts.hour,
 */
  if (__pyx_v_error) {

    /* "pandas/tslib.pyx":924
 * 
 *     if error:
 *         fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month,             # <<<<<<<<<<<<<<
 *                                                dts.day, dts.hour,
 *                                                dts.min, dts.sec)
 */
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts->year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);

    /* "pandas/tslib.pyx":925
 *     if error:
 *         fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month,
 *                                                dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                                                dts.min, dts.sec)
 * 
 */
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);

    /* "pandas/tslib.pyx":926
 *         fmt = '%d-%.2d-%.2d %.2d:%.2d:%.2d' % (dts.year, dts.month,
 *                                                dts.day, dts.hour,
 *                                                dts.min, dts.sec)             # <<<<<<<<<<<<<<
 * 
 *         raise OutOfBoundsDatetime('Out of bounds nanosecond timestamp: %s' % fmt)
 */
    __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts->sec); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_43), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_v_fmt = ((PyObject *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":928
 *                                                dts.min, dts.sec)
 * 
 *         raise OutOfBoundsDatetime('Out of bounds nanosecond timestamp: %s' % fmt)             # <<<<<<<<<<<<<<
 * 
 * # elif isinstance(ts, _Timestamp):
 */
    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__OutOfBoundsDatetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_v_fmt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_10));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pandas.tslib._check_dts_bounds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* "pandas/tslib.pyx":939
 * #     obj.dtval = _dts_to_pydatetime(&obj.dts)
 * 
 * def datetime_to_datetime64(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_5tslib_20datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_inferred_tz = 0;
  PyArrayObject *__pyx_v_iresult = 0;
  pandas_datetimestruct __pyx_v_dts;
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v__ts = 0;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult;
  __Pyx_Buffer __pyx_pybuffer_iresult;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  __pyx_t_5numpy_int64_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("datetime_to_datetime64", 0);
  __pyx_pybuffer_iresult.pybuffer.buf = NULL;
  __pyx_pybuffer_iresult.refcount = 0;
  __pyx_pybuffernd_iresult.data = NULL;
  __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult;
  __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[0]; __pyx_lineno = 939; __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/tslib.pyx":941
 * def datetime_to_datetime64(ndarray[object] values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         object val, inferred_tz = None
 *         ndarray[int64_t] iresult
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":942
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         object val, inferred_tz = None             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] iresult
 *         pandas_datetimestruct dts
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_inferred_tz = Py_None;

  /* "pandas/tslib.pyx":947
 *         _TSObject _ts
 * 
 *     result = np.empty(n, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *     iresult = result.view('i8')
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":948
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = values[i]
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_iresult = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":949
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         if _checknull_with_nat(val):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/tslib.pyx":950
 *     iresult = result.view('i8')
 *     for i in range(n):
 *         val = values[i]             # <<<<<<<<<<<<<<
 *         if _checknull_with_nat(val):
 *             iresult[i] = iNaT
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":951
 *     for i in range(n):
 *         val = values[i]
 *         if _checknull_with_nat(val):             # <<<<<<<<<<<<<<
 *             iresult[i] = iNaT
 *         elif PyDateTime_Check(val):
 */
    __pyx_t_13 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val);
    if (__pyx_t_13) {

      /* "pandas/tslib.pyx":952
 *         val = values[i]
 *         if _checknull_with_nat(val):
 *             iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *         elif PyDateTime_Check(val):
 *             if val.tzinfo is not None:
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_14 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_iresult.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_14;
      goto __pyx_L5;
    }

    /* "pandas/tslib.pyx":953
 *         if _checknull_with_nat(val):
 *             iresult[i] = iNaT
 *         elif PyDateTime_Check(val):             # <<<<<<<<<<<<<<
 *             if val.tzinfo is not None:
 *                 if inferred_tz is not None:
 */
    __pyx_t_13 = PyDateTime_Check(__pyx_v_val);
    if (__pyx_t_13) {

      /* "pandas/tslib.pyx":954
 *             iresult[i] = iNaT
 *         elif PyDateTime_Check(val):
 *             if val.tzinfo is not None:             # <<<<<<<<<<<<<<
 *                 if inferred_tz is not None:
 *                     if _get_zone(val.tzinfo) != inferred_tz:
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = (__pyx_t_2 != Py_None);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_13) {

        /* "pandas/tslib.pyx":955
 *         elif PyDateTime_Check(val):
 *             if val.tzinfo is not None:
 *                 if inferred_tz is not None:             # <<<<<<<<<<<<<<
 *                     if _get_zone(val.tzinfo) != inferred_tz:
 *                         raise ValueError('Array must be all same time zone')
 */
        __pyx_t_13 = (__pyx_v_inferred_tz != Py_None);
        if (__pyx_t_13) {

          /* "pandas/tslib.pyx":956
 *             if val.tzinfo is not None:
 *                 if inferred_tz is not None:
 *                     if _get_zone(val.tzinfo) != inferred_tz:             # <<<<<<<<<<<<<<
 *                         raise ValueError('Array must be all same time zone')
 *                 else:
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_v_inferred_tz, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_13) {

            /* "pandas/tslib.pyx":957
 *                 if inferred_tz is not None:
 *                     if _get_zone(val.tzinfo) != inferred_tz:
 *                         raise ValueError('Array must be all same time zone')             # <<<<<<<<<<<<<<
 *                 else:
 *                     inferred_tz = _get_zone(val.tzinfo)
 */
            __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_Raise(__pyx_t_2, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            goto __pyx_L8;
          }
          __pyx_L8:;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":959
 *                         raise ValueError('Array must be all same time zone')
 *                 else:
 *                     inferred_tz = _get_zone(val.tzinfo)             # <<<<<<<<<<<<<<
 * 
 *                 _ts = convert_to_tsobject(val, None, None)
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __pyx_f_6pandas_5tslib__get_zone(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_v_inferred_tz);
          __pyx_v_inferred_tz = __pyx_t_5;
          __pyx_t_5 = 0;
        }
        __pyx_L7:;

        /* "pandas/tslib.pyx":961
 *                     inferred_tz = _get_zone(val.tzinfo)
 * 
 *                 _ts = convert_to_tsobject(val, None, None)             # <<<<<<<<<<<<<<
 *                 iresult[i] = _ts.value
 *                 _check_dts_bounds(&_ts.dts)
 */
        __pyx_t_5 = Py_None;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __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;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v__ts));
        __pyx_v__ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "pandas/tslib.pyx":962
 * 
 *                 _ts = convert_to_tsobject(val, None, None)
 *                 iresult[i] = _ts.value             # <<<<<<<<<<<<<<
 *                 _check_dts_bounds(&_ts.dts)
 *             else:
 */
        __pyx_t_14 = __pyx_v__ts->value;
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_iresult.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_14;

        /* "pandas/tslib.pyx":963
 *                 _ts = convert_to_tsobject(val, None, None)
 *                 iresult[i] = _ts.value
 *                 _check_dts_bounds(&_ts.dts)             # <<<<<<<<<<<<<<
 *             else:
 *                 if inferred_tz is not None:
 */
        __pyx_t_4 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v__ts->dts)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":965
 *                 _check_dts_bounds(&_ts.dts)
 *             else:
 *                 if inferred_tz is not None:             # <<<<<<<<<<<<<<
 *                     raise ValueError('Cannot mix tz-aware with tz-naive values')
 *                 iresult[i] = _pydatetime_to_dts(val, &dts)
 */
        __pyx_t_13 = (__pyx_v_inferred_tz != Py_None);
        if (__pyx_t_13) {

          /* "pandas/tslib.pyx":966
 *             else:
 *                 if inferred_tz is not None:
 *                     raise ValueError('Cannot mix tz-aware with tz-naive values')             # <<<<<<<<<<<<<<
 *                 iresult[i] = _pydatetime_to_dts(val, &dts)
 *                 _check_dts_bounds(&dts)
 */
          __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "pandas/tslib.pyx":967
 *                 if inferred_tz is not None:
 *                     raise ValueError('Cannot mix tz-aware with tz-naive values')
 *                 iresult[i] = _pydatetime_to_dts(val, &dts)             # <<<<<<<<<<<<<<
 *                 _check_dts_bounds(&dts)
 *         else:
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_17 < 0) {
          __pyx_t_17 += __pyx_pybuffernd_iresult.diminfo[0].shape;
          if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":968
 *                     raise ValueError('Cannot mix tz-aware with tz-naive values')
 *                 iresult[i] = _pydatetime_to_dts(val, &dts)
 *                 _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('Unrecognized value type: %s' % type(val))
 */
        __pyx_t_4 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":970
 *                 _check_dts_bounds(&dts)
 *         else:
 *             raise TypeError('Unrecognized value type: %s' % type(val))             # <<<<<<<<<<<<<<
 * 
 *     return result, inferred_tz
 */
      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_50), ((PyObject *)Py_TYPE(__pyx_v_val))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
      __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "pandas/tslib.pyx":972
 *             raise TypeError('Unrecognized value type: %s' % type(val))
 * 
 *     return result, inferred_tz             # <<<<<<<<<<<<<<
 * 
 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T'])
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __Pyx_INCREF(__pyx_v_inferred_tz);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_inferred_tz);
  __Pyx_GIVEREF(__pyx_v_inferred_tz);
  __pyx_r = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_23_does_string_look_like_datetime = {__Pyx_NAMESTR("_does_string_look_like_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_23_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_does_string_look_like_datetime (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(__pyx_self, ((PyObject *)__pyx_v_date_string));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":976
 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T'])
 * 
 * def _does_string_look_like_datetime(date_string):             # <<<<<<<<<<<<<<
 *     if date_string.startswith('0'):
 *         # Strings starting with 0 are more consistent with a
 */

static PyObject *__pyx_pf_6pandas_5tslib_22_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  double __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_does_string_look_like_datetime", 0);

  /* "pandas/tslib.pyx":977
 * 
 * def _does_string_look_like_datetime(date_string):
 *     if date_string.startswith('0'):             # <<<<<<<<<<<<<<
 *         # Strings starting with 0 are more consistent with a
 *         # date-like string than a number
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_date_string, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":980
 *         # Strings starting with 0 are more consistent with a
 *         # date-like string than a number
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":982
 *         return True
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if float(date_string) < 1000:
 *             return False
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "pandas/tslib.pyx":983
 * 
 *     try:
 *         if float(date_string) < 1000:             # <<<<<<<<<<<<<<
 *             return False
 *     except ValueError:
 */
      __pyx_t_7 = __Pyx_PyObject_AsDouble(__pyx_v_date_string); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __pyx_t_3 = (__pyx_t_7 < 1000.0);
      if (__pyx_t_3) {

        /* "pandas/tslib.pyx":984
 *     try:
 *         if float(date_string) < 1000:
 *             return False             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         pass
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L8_try_return;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L11_try_end;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L0;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":985
 *         if float(date_string) < 1000:
 *             return False
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_8) {
      PyErr_Restore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_L11_try_end:;
  }

  /* "pandas/tslib.pyx":988
 *         pass
 * 
 *     if date_string in _not_datelike_strings:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_52); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_date_string, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":989
 * 
 *     if date_string in _not_datelike_strings:
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     return True
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "pandas/tslib.pyx":991
 *         return False
 * 
 *     return True             # <<<<<<<<<<<<<<
 * 
 * def parse_datetime_string(date_string, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_25parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_25parse_datetime_string = {__Pyx_NAMESTR("parse_datetime_string"), (PyCFunction)__pyx_pw_6pandas_5tslib_25parse_datetime_string, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_25parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_date_string = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_datetime_string (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__date_string,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__date_string)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "parse_datetime_string") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_date_string = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_datetime_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("pandas.tslib.parse_datetime_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_24parse_datetime_string(__pyx_self, __pyx_v_date_string, __pyx_v_kwargs);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":993
 *     return True
 * 
 * def parse_datetime_string(date_string, **kwargs):             # <<<<<<<<<<<<<<
 *     if not _does_string_look_like_datetime(date_string):
 *         raise ValueError('Given date string not likely a datetime.')
 */

static PyObject *__pyx_pf_6pandas_5tslib_24parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_datetime_string", 0);

  /* "pandas/tslib.pyx":994
 * 
 * def parse_datetime_string(date_string, **kwargs):
 *     if not _does_string_look_like_datetime(date_string):             # <<<<<<<<<<<<<<
 *         raise ValueError('Given date string not likely a datetime.')
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_53); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_date_string);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_date_string);
  __Pyx_GIVEREF(__pyx_v_date_string);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":995
 * def parse_datetime_string(date_string, **kwargs):
 *     if not _does_string_look_like_datetime(date_string):
 *         raise ValueError('Given date string not likely a datetime.')             # <<<<<<<<<<<<<<
 * 
 *     dt = parse_date(date_string, **kwargs)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":997
 *         raise ValueError('Given date string not likely a datetime.')
 * 
 *     dt = parse_date(date_string, **kwargs)             # <<<<<<<<<<<<<<
 *     return dt
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__parse_date); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_date_string);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_date_string);
  __Pyx_GIVEREF(__pyx_v_date_string);
  __pyx_t_1 = ((PyObject *)__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_dt = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":998
 * 
 *     dt = parse_date(date_string, **kwargs)
 *     return dt             # <<<<<<<<<<<<<<
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dt);
  __pyx_r = __pyx_v_dt;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_27array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_27array_to_datetime = {__Pyx_NAMESTR("array_to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_27array_to_datetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_27array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_raise_ = 0;
  PyObject *__pyx_v_dayfirst = 0;
  CYTHON_UNUSED PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_utc = 0;
  PyObject *__pyx_v_coerce = 0;
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_to_datetime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__raise_,&__pyx_n_s__dayfirst,&__pyx_n_s__format,&__pyx_n_s__utc,&__pyx_n_s__coerce,&__pyx_n_s__unit,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = __pyx_k_56;
    values[2] = __pyx_k_57;

    /* "pandas/tslib.pyx":1001
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,
 *                       format=None, utc=None, coerce=False, unit=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    values[5] = __pyx_k_58;
    values[6] = ((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  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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__raise_);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dayfirst);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__utc);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_to_datetime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_raise_ = values[1];
    __pyx_v_dayfirst = values[2];
    __pyx_v_format = values[3];
    __pyx_v_utc = values[4];
    __pyx_v_coerce = values[5];
    __pyx_v_unit = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_to_datetime", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __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[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_26array_to_datetime(__pyx_self, __pyx_v_values, __pyx_v_raise_, __pyx_v_dayfirst, __pyx_v_format, __pyx_v_utc, __pyx_v_coerce, __pyx_v_unit);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1000
 *     return dt
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,             # <<<<<<<<<<<<<<
 *                       format=None, utc=None, coerce=False, unit=None):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_5tslib_26array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_raise_, PyObject *__pyx_v_dayfirst, CYTHON_UNUSED PyObject *__pyx_v_format, PyObject *__pyx_v_utc, PyObject *__pyx_v_coerce, PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyArrayObject *__pyx_v_iresult = 0;
  PyArrayObject *__pyx_v_oresult = 0;
  pandas_datetimestruct __pyx_v_dts;
  int __pyx_v_utc_convert;
  int __pyx_v_seen_integer;
  int __pyx_v_seen_datetime;
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v__ts = 0;
  __pyx_t_5numpy_int64_t __pyx_v_m;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult;
  __Pyx_Buffer __pyx_pybuffer_iresult;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oresult;
  __Pyx_Buffer __pyx_pybuffer_oresult;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  int __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  PyObject *__pyx_t_38 = NULL;
  PyObject *__pyx_t_39 = NULL;
  PyObject *__pyx_t_40 = NULL;
  PyObject *__pyx_t_41 = NULL;
  PyObject *__pyx_t_42 = NULL;
  PyObject *__pyx_t_43 = NULL;
  Py_ssize_t __pyx_t_44;
  Py_ssize_t __pyx_t_45;
  Py_ssize_t __pyx_t_46;
  Py_ssize_t __pyx_t_47;
  PyArrayObject *__pyx_t_48 = NULL;
  Py_ssize_t __pyx_t_49;
  Py_ssize_t __pyx_t_50;
  PyObject **__pyx_t_51;
  Py_ssize_t __pyx_t_52;
  Py_ssize_t __pyx_t_53;
  Py_ssize_t __pyx_t_54;
  Py_ssize_t __pyx_t_55;
  Py_ssize_t __pyx_t_56;
  Py_ssize_t __pyx_t_57;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_to_datetime", 0);
  __pyx_pybuffer_iresult.pybuffer.buf = NULL;
  __pyx_pybuffer_iresult.refcount = 0;
  __pyx_pybuffernd_iresult.data = NULL;
  __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult;
  __pyx_pybuffer_oresult.pybuffer.buf = NULL;
  __pyx_pybuffer_oresult.refcount = 0;
  __pyx_pybuffernd_oresult.data = NULL;
  __pyx_pybuffernd_oresult.rcbuffer = &__pyx_pybuffer_oresult;
  __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[0]; __pyx_lineno = 1000; __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/tslib.pyx":1003
 *                       format=None, utc=None, coerce=False, unit=None):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         object val
 *         ndarray[int64_t] iresult
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1008
 *         ndarray[object] oresult
 *         pandas_datetimestruct dts
 *         bint utc_convert = bool(utc), seen_integer=0, seen_datetime=0             # <<<<<<<<<<<<<<
 *         _TSObject _ts
 *         int64_t m = cast_from_unit(None,unit)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_utc); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_utc_convert = (!(!__pyx_t_2));
  __pyx_v_seen_integer = 0;
  __pyx_v_seen_datetime = 0;

  /* "pandas/tslib.pyx":1010
 *         bint utc_convert = bool(utc), seen_integer=0, seen_datetime=0
 *         _TSObject _ts
 *         int64_t m = cast_from_unit(None,unit)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_3 = Py_None;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_t_3, __pyx_v_unit, 0); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_m = __pyx_t_4;

  /* "pandas/tslib.pyx":1012
 *         int64_t m = cast_from_unit(None,unit)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         result = np.empty(n, dtype='M8[ns]')
 *         iresult = result.view('i8')
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "pandas/tslib.pyx":1013
 * 
 *     try:
 *         result = np.empty(n, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *         iresult = result.view('i8')
 *         for i in range(n):
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_v_result = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "pandas/tslib.pyx":1014
 *     try:
 *         result = np.empty(n, dtype='M8[ns]')
 *         iresult = result.view('i8')             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             val = values[i]
 */
      __pyx_t_10 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
        __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_12 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
        }
        __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_t_11 = 0;
      __pyx_v_iresult = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pandas/tslib.pyx":1015
 *         result = np.empty(n, dtype='M8[ns]')
 *         iresult = result.view('i8')
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if _checknull_with_nat(val):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) {
        __pyx_v_i = __pyx_t_16;

        /* "pandas/tslib.pyx":1016
 *         iresult = result.view('i8')
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             if _checknull_with_nat(val):
 *                 iresult[i] = iNaT
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_17 < 0) {
          __pyx_t_17 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_17 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_3);
        __Pyx_XDECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "pandas/tslib.pyx":1017
 *         for i in range(n):
 *             val = values[i]
 *             if _checknull_with_nat(val):             # <<<<<<<<<<<<<<
 *                 iresult[i] = iNaT
 *             elif PyDateTime_Check(val):
 */
        __pyx_t_2 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val);
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1018
 *             val = values[i]
 *             if _checknull_with_nat(val):
 *                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *             elif PyDateTime_Check(val):
 *                 seen_datetime=1
 */
          __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_iresult.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;
          goto __pyx_L13;
        }

        /* "pandas/tslib.pyx":1019
 *             if _checknull_with_nat(val):
 *                 iresult[i] = iNaT
 *             elif PyDateTime_Check(val):             # <<<<<<<<<<<<<<
 *                 seen_datetime=1
 *                 if val.tzinfo is not None:
 */
        __pyx_t_2 = PyDateTime_Check(__pyx_v_val);
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1020
 *                 iresult[i] = iNaT
 *             elif PyDateTime_Check(val):
 *                 seen_datetime=1             # <<<<<<<<<<<<<<
 *                 if val.tzinfo is not None:
 *                     if utc_convert:
 */
          __pyx_v_seen_datetime = 1;

          /* "pandas/tslib.pyx":1021
 *             elif PyDateTime_Check(val):
 *                 seen_datetime=1
 *                 if val.tzinfo is not None:             # <<<<<<<<<<<<<<
 *                     if utc_convert:
 *                         _ts = convert_to_tsobject(val, None, unit)
 */
          __pyx_t_3 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = (__pyx_t_3 != Py_None);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_2) {

            /* "pandas/tslib.pyx":1022
 *                 seen_datetime=1
 *                 if val.tzinfo is not None:
 *                     if utc_convert:             # <<<<<<<<<<<<<<
 *                         _ts = convert_to_tsobject(val, None, unit)
 *                         iresult[i] = _ts.value
 */
            if (__pyx_v_utc_convert) {

              /* "pandas/tslib.pyx":1023
 *                 if val.tzinfo is not None:
 *                     if utc_convert:
 *                         _ts = convert_to_tsobject(val, None, unit)             # <<<<<<<<<<<<<<
 *                         iresult[i] = _ts.value
 *                         try:
 */
              __pyx_t_3 = Py_None;
              __Pyx_INCREF(__pyx_t_3);
              __pyx_t_10 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_val, __pyx_t_3, __pyx_v_unit); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
              __Pyx_XDECREF(((PyObject *)__pyx_v__ts));
              __pyx_v__ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_10);
              __pyx_t_10 = 0;

              /* "pandas/tslib.pyx":1024
 *                     if utc_convert:
 *                         _ts = convert_to_tsobject(val, None, unit)
 *                         iresult[i] = _ts.value             # <<<<<<<<<<<<<<
 *                         try:
 *                             _check_dts_bounds(&_ts.dts)
 */
              __pyx_t_4 = __pyx_v__ts->value;
              __pyx_t_19 = __pyx_v_i;
              __pyx_t_12 = -1;
              if (__pyx_t_19 < 0) {
                __pyx_t_19 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                if (unlikely(__pyx_t_19 < 0)) __pyx_t_12 = 0;
              } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
              if (unlikely(__pyx_t_12 != -1)) {
                __Pyx_RaiseBufferIndexError(__pyx_t_12);
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
              }
              *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

              /* "pandas/tslib.pyx":1025
 *                         _ts = convert_to_tsobject(val, None, unit)
 *                         iresult[i] = _ts.value
 *                         try:             # <<<<<<<<<<<<<<
 *                             _check_dts_bounds(&_ts.dts)
 *                         except ValueError:
 */
              {
                __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                __Pyx_XGOTREF(__pyx_t_15);
                __Pyx_XGOTREF(__pyx_t_14);
                __Pyx_XGOTREF(__pyx_t_13);
                /*try:*/ {

                  /* "pandas/tslib.pyx":1026
 *                         iresult[i] = _ts.value
 *                         try:
 *                             _check_dts_bounds(&_ts.dts)             # <<<<<<<<<<<<<<
 *                         except ValueError:
 *                             if coerce:
 */
                  __pyx_t_10 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v__ts->dts)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
                  __Pyx_GOTREF(__pyx_t_10);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                goto __pyx_L23_try_end;
                __pyx_L16_error:;
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

                /* "pandas/tslib.pyx":1027
 *                         try:
 *                             _check_dts_bounds(&_ts.dts)
 *                         except ValueError:             # <<<<<<<<<<<<<<
 *                             if coerce:
 *                                 iresult[i] = iNaT
 */
                __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
                if (__pyx_t_12) {
                  __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                  __Pyx_GOTREF(__pyx_t_10);
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_GOTREF(__pyx_t_9);

                  /* "pandas/tslib.pyx":1028
 *                             _check_dts_bounds(&_ts.dts)
 *                         except ValueError:
 *                             if coerce:             # <<<<<<<<<<<<<<
 *                                 iresult[i] = iNaT
 *                                 continue
 */
                  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                  if (__pyx_t_2) {

                    /* "pandas/tslib.pyx":1029
 *                         except ValueError:
 *                             if coerce:
 *                                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                                 continue
 *                             raise
 */
                    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __pyx_t_20 = __pyx_v_i;
                    __pyx_t_12 = -1;
                    if (__pyx_t_20 < 0) {
                      __pyx_t_20 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                      if (unlikely(__pyx_t_20 < 0)) __pyx_t_12 = 0;
                    } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                    if (unlikely(__pyx_t_12 != -1)) {
                      __Pyx_RaiseBufferIndexError(__pyx_t_12);
                      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                    }
                    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                    /* "pandas/tslib.pyx":1030
 *                             if coerce:
 *                                 iresult[i] = iNaT
 *                                 continue             # <<<<<<<<<<<<<<
 *                             raise
 *                     else:
 */
                    goto __pyx_L25_except_continue;
                    goto __pyx_L26;
                  }
                  __pyx_L26:;

                  /* "pandas/tslib.pyx":1031
 *                                 iresult[i] = iNaT
 *                                 continue
 *                             raise             # <<<<<<<<<<<<<<
 *                     else:
 *                         raise ValueError('Tz-aware datetime.datetime cannot '
 */
                  __Pyx_GIVEREF(__pyx_t_10);
                  __Pyx_GIVEREF(__pyx_t_3);
                  __Pyx_GIVEREF(__pyx_t_9);
                  __Pyx_ErrRestore(__pyx_t_10, __pyx_t_3, __pyx_t_9);
                  __pyx_t_10 = 0; __pyx_t_3 = 0; __pyx_t_9 = 0; 
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                  goto __pyx_L17_exception_handled;
                  __pyx_L25_except_continue:;
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                  goto __pyx_L22_try_continue;
                }
                __pyx_L18_except_error:;
                __Pyx_XGIVEREF(__pyx_t_15);
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                goto __pyx_L3_error;
                __pyx_L22_try_continue:;
                __Pyx_XGIVEREF(__pyx_t_15);
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                goto __pyx_L11_continue;
                __pyx_L17_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_15);
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
                __pyx_L23_try_end:;
              }
              goto __pyx_L15;
            }
            /*else*/ {

              /* "pandas/tslib.pyx":1033
 *                             raise
 *                     else:
 *                         raise ValueError('Tz-aware datetime.datetime cannot '             # <<<<<<<<<<<<<<
 *                                          'be converted to datetime64 unless '
 *                                          'utc=True')
 */
              __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_Raise(__pyx_t_9, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            __pyx_L15:;
            goto __pyx_L14;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1037
 *                                          'utc=True')
 *                 else:
 *                     iresult[i] = _pydatetime_to_dts(val, &dts)             # <<<<<<<<<<<<<<
 *                     if is_timestamp(val):
 *                         iresult[i] += (<_Timestamp>val).nanosecond
 */
            __pyx_t_21 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_21 < 0) {
              __pyx_t_21 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_21 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_v_val, (&__pyx_v_dts));

            /* "pandas/tslib.pyx":1038
 *                 else:
 *                     iresult[i] = _pydatetime_to_dts(val, &dts)
 *                     if is_timestamp(val):             # <<<<<<<<<<<<<<
 *                         iresult[i] += (<_Timestamp>val).nanosecond
 *                     try:
 */
            __pyx_t_2 = __pyx_f_6pandas_5tslib_is_timestamp(__pyx_v_val);
            if (__pyx_t_2) {

              /* "pandas/tslib.pyx":1039
 *                     iresult[i] = _pydatetime_to_dts(val, &dts)
 *                     if is_timestamp(val):
 *                         iresult[i] += (<_Timestamp>val).nanosecond             # <<<<<<<<<<<<<<
 *                     try:
 *                         _check_dts_bounds(&dts)
 */
              __pyx_t_22 = __pyx_v_i;
              __pyx_t_12 = -1;
              if (__pyx_t_22 < 0) {
                __pyx_t_22 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                if (unlikely(__pyx_t_22 < 0)) __pyx_t_12 = 0;
              } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
              if (unlikely(__pyx_t_12 != -1)) {
                __Pyx_RaiseBufferIndexError(__pyx_t_12);
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
              }
              *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_iresult.diminfo[0].strides) += ((struct __pyx_obj_6pandas_5tslib__Timestamp *)__pyx_v_val)->nanosecond;
              goto __pyx_L27;
            }
            __pyx_L27:;

            /* "pandas/tslib.pyx":1040
 *                     if is_timestamp(val):
 *                         iresult[i] += (<_Timestamp>val).nanosecond
 *                     try:             # <<<<<<<<<<<<<<
 *                         _check_dts_bounds(&dts)
 *                     except ValueError:
 */
            {
              __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_13);
              __Pyx_XGOTREF(__pyx_t_14);
              __Pyx_XGOTREF(__pyx_t_15);
              /*try:*/ {

                /* "pandas/tslib.pyx":1041
 *                         iresult[i] += (<_Timestamp>val).nanosecond
 *                     try:
 *                         _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *                     except ValueError:
 *                         if coerce:
 */
                __pyx_t_9 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L35_try_end;
              __pyx_L28_error:;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "pandas/tslib.pyx":1042
 *                     try:
 *                         _check_dts_bounds(&dts)
 *                     except ValueError:             # <<<<<<<<<<<<<<
 *                         if coerce:
 *                             iresult[i] = iNaT
 */
              __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
              if (__pyx_t_12) {
                __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_GOTREF(__pyx_t_10);

                /* "pandas/tslib.pyx":1043
 *                         _check_dts_bounds(&dts)
 *                     except ValueError:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                             iresult[i] = iNaT
 *                             continue
 */
                __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                if (__pyx_t_2) {

                  /* "pandas/tslib.pyx":1044
 *                     except ValueError:
 *                         if coerce:
 *                             iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                             continue
 *                         raise
 */
                  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __pyx_t_23 = __pyx_v_i;
                  __pyx_t_12 = -1;
                  if (__pyx_t_23 < 0) {
                    __pyx_t_23 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                    if (unlikely(__pyx_t_23 < 0)) __pyx_t_12 = 0;
                  } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                  if (unlikely(__pyx_t_12 != -1)) {
                    __Pyx_RaiseBufferIndexError(__pyx_t_12);
                    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                  }
                  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                  /* "pandas/tslib.pyx":1045
 *                         if coerce:
 *                             iresult[i] = iNaT
 *                             continue             # <<<<<<<<<<<<<<
 *                         raise
 *             elif PyDate_Check(val):
 */
                  goto __pyx_L37_except_continue;
                  goto __pyx_L38;
                }
                __pyx_L38:;

                /* "pandas/tslib.pyx":1046
 *                             iresult[i] = iNaT
 *                             continue
 *                         raise             # <<<<<<<<<<<<<<
 *             elif PyDate_Check(val):
 *                 iresult[i] = _date_to_datetime64(val, &dts)
 */
                __Pyx_GIVEREF(__pyx_t_9);
                __Pyx_GIVEREF(__pyx_t_3);
                __Pyx_GIVEREF(__pyx_t_10);
                __Pyx_ErrRestore(__pyx_t_9, __pyx_t_3, __pyx_t_10);
                __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_10 = 0; 
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L29_exception_handled;
                __pyx_L37_except_continue:;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L34_try_continue;
              }
              __pyx_L30_except_error:;
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              goto __pyx_L3_error;
              __pyx_L34_try_continue:;
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              goto __pyx_L11_continue;
              __pyx_L29_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              __pyx_L35_try_end:;
            }
          }
          __pyx_L14:;
          goto __pyx_L13;
        }

        /* "pandas/tslib.pyx":1047
 *                             continue
 *                         raise
 *             elif PyDate_Check(val):             # <<<<<<<<<<<<<<
 *                 iresult[i] = _date_to_datetime64(val, &dts)
 *                 try:
 */
        __pyx_t_2 = PyDate_Check(__pyx_v_val);
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1048
 *                         raise
 *             elif PyDate_Check(val):
 *                 iresult[i] = _date_to_datetime64(val, &dts)             # <<<<<<<<<<<<<<
 *                 try:
 *                     _check_dts_bounds(&dts)
 */
          __pyx_t_24 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_24 += __pyx_pybuffernd_iresult.diminfo[0].shape;
            if (unlikely(__pyx_t_24 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__date_to_datetime64(__pyx_v_val, (&__pyx_v_dts));

          /* "pandas/tslib.pyx":1049
 *             elif PyDate_Check(val):
 *                 iresult[i] = _date_to_datetime64(val, &dts)
 *                 try:             # <<<<<<<<<<<<<<
 *                     _check_dts_bounds(&dts)
 *                     seen_datetime=1
 */
          {
            __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_13);
            /*try:*/ {

              /* "pandas/tslib.pyx":1050
 *                 iresult[i] = _date_to_datetime64(val, &dts)
 *                 try:
 *                     _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *                     seen_datetime=1
 *                 except ValueError:
 */
              __pyx_t_10 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L39_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "pandas/tslib.pyx":1051
 *                 try:
 *                     _check_dts_bounds(&dts)
 *                     seen_datetime=1             # <<<<<<<<<<<<<<
 *                 except ValueError:
 *                     if coerce:
 */
              __pyx_v_seen_datetime = 1;
            }
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L46_try_end;
            __pyx_L39_error:;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "pandas/tslib.pyx":1052
 *                     _check_dts_bounds(&dts)
 *                     seen_datetime=1
 *                 except ValueError:             # <<<<<<<<<<<<<<
 *                     if coerce:
 *                         iresult[i] = iNaT
 */
            __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
            if (__pyx_t_12) {
              __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_9);

              /* "pandas/tslib.pyx":1053
 *                     seen_datetime=1
 *                 except ValueError:
 *                     if coerce:             # <<<<<<<<<<<<<<
 *                         iresult[i] = iNaT
 *                         continue
 */
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
              if (__pyx_t_2) {

                /* "pandas/tslib.pyx":1054
 *                 except ValueError:
 *                     if coerce:
 *                         iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                         continue
 *                     raise
 */
                __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                __pyx_t_25 = __pyx_v_i;
                __pyx_t_12 = -1;
                if (__pyx_t_25 < 0) {
                  __pyx_t_25 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                  if (unlikely(__pyx_t_25 < 0)) __pyx_t_12 = 0;
                } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                if (unlikely(__pyx_t_12 != -1)) {
                  __Pyx_RaiseBufferIndexError(__pyx_t_12);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
                }
                *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                /* "pandas/tslib.pyx":1055
 *                     if coerce:
 *                         iresult[i] = iNaT
 *                         continue             # <<<<<<<<<<<<<<
 *                     raise
 *             elif util.is_datetime64_object(val):
 */
                goto __pyx_L48_except_continue;
                goto __pyx_L49;
              }
              __pyx_L49:;

              /* "pandas/tslib.pyx":1056
 *                         iresult[i] = iNaT
 *                         continue
 *                     raise             # <<<<<<<<<<<<<<
 *             elif util.is_datetime64_object(val):
 *                 if val == np_NaT:
 */
              __Pyx_GIVEREF(__pyx_t_10);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_ErrRestore(__pyx_t_10, __pyx_t_3, __pyx_t_9);
              __pyx_t_10 = 0; __pyx_t_3 = 0; __pyx_t_9 = 0; 
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L40_exception_handled;
              __pyx_L48_except_continue:;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L45_try_continue;
            }
            __pyx_L41_except_error:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
            goto __pyx_L3_error;
            __pyx_L45_try_continue:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
            goto __pyx_L11_continue;
            __pyx_L40_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
            __pyx_L46_try_end:;
          }
          goto __pyx_L13;
        }

        /* "pandas/tslib.pyx":1057
 *                         continue
 *                     raise
 *             elif util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *                 if val == np_NaT:
 *                     iresult[i] = iNaT
 */
        __pyx_t_12 = is_datetime64_object(__pyx_v_val);
        if (__pyx_t_12) {

          /* "pandas/tslib.pyx":1058
 *                     raise
 *             elif util.is_datetime64_object(val):
 *                 if val == np_NaT:             # <<<<<<<<<<<<<<
 *                     iresult[i] = iNaT
 *                 else:
 */
          __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np_NaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_2) {

            /* "pandas/tslib.pyx":1059
 *             elif util.is_datetime64_object(val):
 *                 if val == np_NaT:
 *                     iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 else:
 *                     try:
 */
            __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_26 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_26 < 0) {
              __pyx_t_26 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_26 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;
            goto __pyx_L50;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1061
 *                     iresult[i] = iNaT
 *                 else:
 *                     try:             # <<<<<<<<<<<<<<
 *                         iresult[i] = _get_datetime64_nanos(val)
 *                         seen_datetime=1
 */
            {
              __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_13);
              __Pyx_XGOTREF(__pyx_t_14);
              __Pyx_XGOTREF(__pyx_t_15);
              /*try:*/ {

                /* "pandas/tslib.pyx":1062
 *                 else:
 *                     try:
 *                         iresult[i] = _get_datetime64_nanos(val)             # <<<<<<<<<<<<<<
 *                         seen_datetime=1
 *                     except ValueError:
 */
                __pyx_t_3 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;}
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;}
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_27 = __pyx_v_i;
                __pyx_t_12 = -1;
                if (__pyx_t_27 < 0) {
                  __pyx_t_27 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                  if (unlikely(__pyx_t_27 < 0)) __pyx_t_12 = 0;
                } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                if (unlikely(__pyx_t_12 != -1)) {
                  __Pyx_RaiseBufferIndexError(__pyx_t_12);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L51_error;}
                }
                *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                /* "pandas/tslib.pyx":1063
 *                     try:
 *                         iresult[i] = _get_datetime64_nanos(val)
 *                         seen_datetime=1             # <<<<<<<<<<<<<<
 *                     except ValueError:
 *                         if coerce:
 */
                __pyx_v_seen_datetime = 1;
              }
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L58_try_end;
              __pyx_L51_error:;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pandas/tslib.pyx":1064
 *                         iresult[i] = _get_datetime64_nanos(val)
 *                         seen_datetime=1
 *                     except ValueError:             # <<<<<<<<<<<<<<
 *                         if coerce:
 *                             iresult[i] = iNaT
 */
              __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
              if (__pyx_t_12) {
                __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_GOTREF(__pyx_t_10);

                /* "pandas/tslib.pyx":1065
 *                         seen_datetime=1
 *                     except ValueError:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                             iresult[i] = iNaT
 *                             continue
 */
                __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                if (__pyx_t_2) {

                  /* "pandas/tslib.pyx":1066
 *                     except ValueError:
 *                         if coerce:
 *                             iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                             continue
 *                         raise
 */
                  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __pyx_t_28 = __pyx_v_i;
                  __pyx_t_12 = -1;
                  if (__pyx_t_28 < 0) {
                    __pyx_t_28 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                    if (unlikely(__pyx_t_28 < 0)) __pyx_t_12 = 0;
                  } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                  if (unlikely(__pyx_t_12 != -1)) {
                    __Pyx_RaiseBufferIndexError(__pyx_t_12);
                    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                  }
                  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                  /* "pandas/tslib.pyx":1067
 *                         if coerce:
 *                             iresult[i] = iNaT
 *                             continue             # <<<<<<<<<<<<<<
 *                         raise
 * 
 */
                  goto __pyx_L60_except_continue;
                  goto __pyx_L61;
                }
                __pyx_L61:;

                /* "pandas/tslib.pyx":1068
 *                             iresult[i] = iNaT
 *                             continue
 *                         raise             # <<<<<<<<<<<<<<
 * 
 *             # if we are coercing, dont' allow integers
 */
                __Pyx_GIVEREF(__pyx_t_3);
                __Pyx_GIVEREF(__pyx_t_9);
                __Pyx_GIVEREF(__pyx_t_10);
                __Pyx_ErrRestore(__pyx_t_3, __pyx_t_9, __pyx_t_10);
                __pyx_t_3 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; 
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L52_exception_handled;
                __pyx_L60_except_continue:;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L57_try_continue;
              }
              __pyx_L53_except_error:;
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              goto __pyx_L3_error;
              __pyx_L57_try_continue:;
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              goto __pyx_L11_continue;
              __pyx_L52_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
              __pyx_L58_try_end:;
            }
          }
          __pyx_L50:;
          goto __pyx_L13;
        }

        /* "pandas/tslib.pyx":1071
 * 
 *             # if we are coercing, dont' allow integers
 *             elif util.is_integer_object(val) and not coerce:             # <<<<<<<<<<<<<<
 *                 if val == iNaT:
 *                     iresult[i] = iNaT
 */
        if (is_integer_object(__pyx_v_val)) {
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_29 = (!__pyx_t_2);
          __pyx_t_2 = __pyx_t_29;
        } else {
          __pyx_t_2 = is_integer_object(__pyx_v_val);
        }
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1072
 *             # if we are coercing, dont' allow integers
 *             elif util.is_integer_object(val) and not coerce:
 *                 if val == iNaT:             # <<<<<<<<<<<<<<
 *                     iresult[i] = iNaT
 *                 else:
 */
          __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_2) {

            /* "pandas/tslib.pyx":1073
 *             elif util.is_integer_object(val) and not coerce:
 *                 if val == iNaT:
 *                     iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 else:
 *                     iresult[i] = val*m
 */
            __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_30 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_30 < 0) {
              __pyx_t_30 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_30 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;
            goto __pyx_L62;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1075
 *                     iresult[i] = iNaT
 *                 else:
 *                     iresult[i] = val*m             # <<<<<<<<<<<<<<
 *                     seen_integer=1
 *             elif util.is_float_object(val) and not coerce:
 */
            __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_m); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = PyNumber_Multiply(__pyx_v_val, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_31 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_31 < 0) {
              __pyx_t_31 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_31 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

            /* "pandas/tslib.pyx":1076
 *                 else:
 *                     iresult[i] = val*m
 *                     seen_integer=1             # <<<<<<<<<<<<<<
 *             elif util.is_float_object(val) and not coerce:
 *                 if val != val or val == iNaT:
 */
            __pyx_v_seen_integer = 1;
          }
          __pyx_L62:;
          goto __pyx_L13;
        }

        /* "pandas/tslib.pyx":1077
 *                     iresult[i] = val*m
 *                     seen_integer=1
 *             elif util.is_float_object(val) and not coerce:             # <<<<<<<<<<<<<<
 *                 if val != val or val == iNaT:
 *                     iresult[i] = iNaT
 */
        if (is_float_object(__pyx_v_val)) {
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_29 = (!__pyx_t_2);
          __pyx_t_2 = __pyx_t_29;
        } else {
          __pyx_t_2 = is_float_object(__pyx_v_val);
        }
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1078
 *                     seen_integer=1
 *             elif util.is_float_object(val) and not coerce:
 *                 if val != val or val == iNaT:             # <<<<<<<<<<<<<<
 *                     iresult[i] = iNaT
 *                 else:
 */
          __pyx_t_10 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (!__pyx_t_2) {
            __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_32 = __pyx_t_29;
          } else {
            __pyx_t_32 = __pyx_t_2;
          }
          if (__pyx_t_32) {

            /* "pandas/tslib.pyx":1079
 *             elif util.is_float_object(val) and not coerce:
 *                 if val != val or val == iNaT:
 *                     iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 else:
 *                     iresult[i] = cast_from_unit(val,unit)
 */
            __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_33 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_33 < 0) {
              __pyx_t_33 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_33 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;
            goto __pyx_L63;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1081
 *                     iresult[i] = iNaT
 *                 else:
 *                     iresult[i] = cast_from_unit(val,unit)             # <<<<<<<<<<<<<<
 *                     seen_integer=1
 *             else:
 */
            __pyx_t_4 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_val, __pyx_v_unit, 0); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __pyx_t_34 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_34 < 0) {
              __pyx_t_34 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_34 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

            /* "pandas/tslib.pyx":1082
 *                 else:
 *                     iresult[i] = cast_from_unit(val,unit)
 *                     seen_integer=1             # <<<<<<<<<<<<<<
 *             else:
 *                 try:
 */
            __pyx_v_seen_integer = 1;
          }
          __pyx_L63:;
          goto __pyx_L13;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1084
 *                     seen_integer=1
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     if len(val) == 0:
 *                        iresult[i] = iNaT
 */
          {
            __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_13);
            /*try:*/ {

              /* "pandas/tslib.pyx":1085
 *             else:
 *                 try:
 *                     if len(val) == 0:             # <<<<<<<<<<<<<<
 *                        iresult[i] = iNaT
 *                        continue
 */
              __pyx_t_35 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_35 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __pyx_t_32 = (__pyx_t_35 == 0);
              if (__pyx_t_32) {

                /* "pandas/tslib.pyx":1086
 *                 try:
 *                     if len(val) == 0:
 *                        iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                        continue
 * 
 */
                __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __pyx_t_35 = __pyx_v_i;
                __pyx_t_12 = -1;
                if (__pyx_t_35 < 0) {
                  __pyx_t_35 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                  if (unlikely(__pyx_t_35 < 0)) __pyx_t_12 = 0;
                } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                if (unlikely(__pyx_t_12 != -1)) {
                  __Pyx_RaiseBufferIndexError(__pyx_t_12);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
                }
                *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                /* "pandas/tslib.pyx":1087
 *                     if len(val) == 0:
 *                        iresult[i] = iNaT
 *                        continue             # <<<<<<<<<<<<<<
 * 
 *                     elif val in _nat_strings:
 */
                goto __pyx_L70_try_continue;
                goto __pyx_L72;
              }

              /* "pandas/tslib.pyx":1089
 *                        continue
 * 
 *                     elif val in _nat_strings:             # <<<<<<<<<<<<<<
 *                        iresult[i] = iNaT
 *                        continue
 */
              __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s___nat_strings); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_32 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_32) {

                /* "pandas/tslib.pyx":1090
 * 
 *                     elif val in _nat_strings:
 *                        iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                        continue
 * 
 */
                __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_9); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __pyx_t_36 = __pyx_v_i;
                __pyx_t_12 = -1;
                if (__pyx_t_36 < 0) {
                  __pyx_t_36 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                  if (unlikely(__pyx_t_36 < 0)) __pyx_t_12 = 0;
                } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                if (unlikely(__pyx_t_12 != -1)) {
                  __Pyx_RaiseBufferIndexError(__pyx_t_12);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
                }
                *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                /* "pandas/tslib.pyx":1091
 *                     elif val in _nat_strings:
 *                        iresult[i] = iNaT
 *                        continue             # <<<<<<<<<<<<<<
 * 
 *                     _string_to_dts(val, &dts)
 */
                goto __pyx_L70_try_continue;
                goto __pyx_L72;
              }
              __pyx_L72:;

              /* "pandas/tslib.pyx":1093
 *                        continue
 * 
 *                     _string_to_dts(val, &dts)             # <<<<<<<<<<<<<<
 *                     iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns,
 *                                                                    &dts)
 */
              __pyx_t_9 = __pyx_f_8datetime__string_to_dts(__pyx_v_val, (&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "pandas/tslib.pyx":1094
 * 
 *                     _string_to_dts(val, &dts)
 *                     iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns,             # <<<<<<<<<<<<<<
 *                                                                    &dts)
 *                     _check_dts_bounds(&dts)
 */
              __pyx_t_37 = __pyx_v_i;
              __pyx_t_12 = -1;
              if (__pyx_t_37 < 0) {
                __pyx_t_37 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                if (unlikely(__pyx_t_37 < 0)) __pyx_t_12 = 0;
              } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
              if (unlikely(__pyx_t_12 != -1)) {
                __Pyx_RaiseBufferIndexError(__pyx_t_12);
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              }
              *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts));

              /* "pandas/tslib.pyx":1096
 *                     iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns,
 *                                                                    &dts)
 *                     _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *                 except ValueError:
 *                     try:
 */
              __pyx_t_9 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L71_try_end;
            __pyx_L64_error:;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "pandas/tslib.pyx":1097
 *                                                                    &dts)
 *                     _check_dts_bounds(&dts)
 *                 except ValueError:             # <<<<<<<<<<<<<<
 *                     try:
 *                         iresult[i] = _pydatetime_to_dts(
 */
            __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
            if (__pyx_t_12) {
              __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_GOTREF(__pyx_t_3);

              /* "pandas/tslib.pyx":1098
 *                     _check_dts_bounds(&dts)
 *                 except ValueError:
 *                     try:             # <<<<<<<<<<<<<<
 *                         iresult[i] = _pydatetime_to_dts(
 *                             parse_datetime_string(val, dayfirst=dayfirst),
 */
              {
                __Pyx_ExceptionSave(&__pyx_t_38, &__pyx_t_39, &__pyx_t_40);
                __Pyx_XGOTREF(__pyx_t_38);
                __Pyx_XGOTREF(__pyx_t_39);
                __Pyx_XGOTREF(__pyx_t_40);
                /*try:*/ {

                  /* "pandas/tslib.pyx":1100
 *                     try:
 *                         iresult[i] = _pydatetime_to_dts(
 *                             parse_datetime_string(val, dayfirst=dayfirst),             # <<<<<<<<<<<<<<
 *                             &dts
 *                         )
 */
                  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s_62); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;}
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;}
                  __Pyx_GOTREF(__pyx_t_41);
                  __Pyx_INCREF(__pyx_v_val);
                  PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_v_val);
                  __Pyx_GIVEREF(__pyx_v_val);
                  __pyx_t_42 = PyDict_New(); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;}
                  __Pyx_GOTREF(((PyObject *)__pyx_t_42));
                  if (PyDict_SetItem(__pyx_t_42, ((PyObject *)__pyx_n_s__dayfirst), __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;}
                  __pyx_t_43 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_41), ((PyObject *)__pyx_t_42)); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L75_error;}
                  __Pyx_GOTREF(__pyx_t_43);
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0;
                  __Pyx_DECREF(((PyObject *)__pyx_t_42)); __pyx_t_42 = 0;

                  /* "pandas/tslib.pyx":1099
 *                 except ValueError:
 *                     try:
 *                         iresult[i] = _pydatetime_to_dts(             # <<<<<<<<<<<<<<
 *                             parse_datetime_string(val, dayfirst=dayfirst),
 *                             &dts
 */
                  __pyx_t_44 = __pyx_v_i;
                  __pyx_t_12 = -1;
                  if (__pyx_t_44 < 0) {
                    __pyx_t_44 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                    if (unlikely(__pyx_t_44 < 0)) __pyx_t_12 = 0;
                  } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                  if (unlikely(__pyx_t_12 != -1)) {
                    __Pyx_RaiseBufferIndexError(__pyx_t_12);
                    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L75_error;}
                  }
                  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_43, (&__pyx_v_dts));
                  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
                }
                __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0;
                __Pyx_XDECREF(__pyx_t_39); __pyx_t_39 = 0;
                __Pyx_XDECREF(__pyx_t_40); __pyx_t_40 = 0;
                goto __pyx_L82_try_end;
                __pyx_L75_error:;
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0;
                __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0;
                __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0;

                /* "pandas/tslib.pyx":1103
 *                             &dts
 *                         )
 *                     except Exception:             # <<<<<<<<<<<<<<
 *                         if coerce:
 *                            iresult[i] = iNaT
 */
                __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
                if (__pyx_t_12) {
                  __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_43, &__pyx_t_42, &__pyx_t_41) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                  __Pyx_GOTREF(__pyx_t_43);
                  __Pyx_GOTREF(__pyx_t_42);
                  __Pyx_GOTREF(__pyx_t_41);

                  /* "pandas/tslib.pyx":1104
 *                         )
 *                     except Exception:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                            iresult[i] = iNaT
 *                            continue
 */
                  __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                  if (__pyx_t_32) {

                    /* "pandas/tslib.pyx":1105
 *                     except Exception:
 *                         if coerce:
 *                            iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                            continue
 *                         raise TypeError
 */
                    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __pyx_t_45 = __pyx_v_i;
                    __pyx_t_12 = -1;
                    if (__pyx_t_45 < 0) {
                      __pyx_t_45 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                      if (unlikely(__pyx_t_45 < 0)) __pyx_t_12 = 0;
                    } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                    if (unlikely(__pyx_t_12 != -1)) {
                      __Pyx_RaiseBufferIndexError(__pyx_t_12);
                      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                    }
                    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                    /* "pandas/tslib.pyx":1106
 *                         if coerce:
 *                            iresult[i] = iNaT
 *                            continue             # <<<<<<<<<<<<<<
 *                         raise TypeError
 * 
 */
                    goto __pyx_L84_except_continue;
                    goto __pyx_L85;
                  }
                  __pyx_L85:;

                  /* "pandas/tslib.pyx":1107
 *                            iresult[i] = iNaT
 *                            continue
 *                         raise TypeError             # <<<<<<<<<<<<<<
 * 
 *                     try:
 */
                  __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
                  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
                  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
                  goto __pyx_L76_exception_handled;
                  __pyx_L84_except_continue:;
                  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
                  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
                  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
                  goto __pyx_L81_try_continue;
                }
                __pyx_L77_except_error:;
                __Pyx_XGIVEREF(__pyx_t_38);
                __Pyx_XGIVEREF(__pyx_t_39);
                __Pyx_XGIVEREF(__pyx_t_40);
                __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40);
                goto __pyx_L66_except_error;
                __pyx_L81_try_continue:;
                __Pyx_XGIVEREF(__pyx_t_38);
                __Pyx_XGIVEREF(__pyx_t_39);
                __Pyx_XGIVEREF(__pyx_t_40);
                __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40);
                goto __pyx_L74_except_continue;
                __pyx_L76_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_38);
                __Pyx_XGIVEREF(__pyx_t_39);
                __Pyx_XGIVEREF(__pyx_t_40);
                __Pyx_ExceptionReset(__pyx_t_38, __pyx_t_39, __pyx_t_40);
                __pyx_L82_try_end:;
              }

              /* "pandas/tslib.pyx":1109
 *                         raise TypeError
 * 
 *                     try:             # <<<<<<<<<<<<<<
 *                         _check_dts_bounds(&dts)
 *                     except ValueError:
 */
              {
                __Pyx_ExceptionSave(&__pyx_t_40, &__pyx_t_39, &__pyx_t_38);
                __Pyx_XGOTREF(__pyx_t_40);
                __Pyx_XGOTREF(__pyx_t_39);
                __Pyx_XGOTREF(__pyx_t_38);
                /*try:*/ {

                  /* "pandas/tslib.pyx":1110
 * 
 *                     try:
 *                         _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *                     except ValueError:
 *                         if coerce:
 */
                  __pyx_t_41 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
                  __Pyx_GOTREF(__pyx_t_41);
                  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
                }
                __Pyx_XDECREF(__pyx_t_40); __pyx_t_40 = 0;
                __Pyx_XDECREF(__pyx_t_39); __pyx_t_39 = 0;
                __Pyx_XDECREF(__pyx_t_38); __pyx_t_38 = 0;
                goto __pyx_L93_try_end;
                __pyx_L86_error:;
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0;
                __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0;
                __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0;

                /* "pandas/tslib.pyx":1111
 *                     try:
 *                         _check_dts_bounds(&dts)
 *                     except ValueError:             # <<<<<<<<<<<<<<
 *                         if coerce:
 *                             iresult[i] = iNaT
 */
                __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
                if (__pyx_t_12) {
                  __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_41, &__pyx_t_42, &__pyx_t_43) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                  __Pyx_GOTREF(__pyx_t_41);
                  __Pyx_GOTREF(__pyx_t_42);
                  __Pyx_GOTREF(__pyx_t_43);

                  /* "pandas/tslib.pyx":1112
 *                         _check_dts_bounds(&dts)
 *                     except ValueError:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                             iresult[i] = iNaT
 *                             continue
 */
                  __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                  if (__pyx_t_32) {

                    /* "pandas/tslib.pyx":1113
 *                     except ValueError:
 *                         if coerce:
 *                             iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                             continue
 *                         raise
 */
                    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                    __Pyx_GOTREF(__pyx_t_8);
                    __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_8); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __pyx_t_46 = __pyx_v_i;
                    __pyx_t_12 = -1;
                    if (__pyx_t_46 < 0) {
                      __pyx_t_46 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                      if (unlikely(__pyx_t_46 < 0)) __pyx_t_12 = 0;
                    } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                    if (unlikely(__pyx_t_12 != -1)) {
                      __Pyx_RaiseBufferIndexError(__pyx_t_12);
                      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                    }
                    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                    /* "pandas/tslib.pyx":1114
 *                         if coerce:
 *                             iresult[i] = iNaT
 *                             continue             # <<<<<<<<<<<<<<
 *                         raise
 *                 except:
 */
                    goto __pyx_L95_except_continue;
                    goto __pyx_L96;
                  }
                  __pyx_L96:;

                  /* "pandas/tslib.pyx":1115
 *                             iresult[i] = iNaT
 *                             continue
 *                         raise             # <<<<<<<<<<<<<<
 *                 except:
 *                     if coerce:
 */
                  __Pyx_GIVEREF(__pyx_t_41);
                  __Pyx_GIVEREF(__pyx_t_42);
                  __Pyx_GIVEREF(__pyx_t_43);
                  __Pyx_ErrRestore(__pyx_t_41, __pyx_t_42, __pyx_t_43);
                  __pyx_t_41 = 0; __pyx_t_42 = 0; __pyx_t_43 = 0; 
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
                  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
                  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
                  goto __pyx_L87_exception_handled;
                  __pyx_L95_except_continue:;
                  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
                  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
                  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
                  goto __pyx_L92_try_continue;
                }
                __pyx_L88_except_error:;
                __Pyx_XGIVEREF(__pyx_t_40);
                __Pyx_XGIVEREF(__pyx_t_39);
                __Pyx_XGIVEREF(__pyx_t_38);
                __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38);
                goto __pyx_L66_except_error;
                __pyx_L92_try_continue:;
                __Pyx_XGIVEREF(__pyx_t_40);
                __Pyx_XGIVEREF(__pyx_t_39);
                __Pyx_XGIVEREF(__pyx_t_38);
                __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38);
                goto __pyx_L74_except_continue;
                __pyx_L87_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_40);
                __Pyx_XGIVEREF(__pyx_t_39);
                __Pyx_XGIVEREF(__pyx_t_38);
                __Pyx_ExceptionReset(__pyx_t_40, __pyx_t_39, __pyx_t_38);
                __pyx_L93_try_end:;
              }
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              goto __pyx_L65_exception_handled;
              __pyx_L74_except_continue:;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              goto __pyx_L70_try_continue;
            }

            /* "pandas/tslib.pyx":1116
 *                             continue
 *                         raise
 *                 except:             # <<<<<<<<<<<<<<
 *                     if coerce:
 *                         iresult[i] = iNaT
 */
            /*except:*/ {
              __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_GOTREF(__pyx_t_9);

              /* "pandas/tslib.pyx":1117
 *                         raise
 *                 except:
 *                     if coerce:             # <<<<<<<<<<<<<<
 *                         iresult[i] = iNaT
 *                         continue
 */
              __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              if (__pyx_t_32) {

                /* "pandas/tslib.pyx":1118
 *                 except:
 *                     if coerce:
 *                         iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                         continue
 *                     raise
 */
                __pyx_t_43 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
                __Pyx_GOTREF(__pyx_t_43);
                __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_43); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
                __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
                __pyx_t_47 = __pyx_v_i;
                __pyx_t_12 = -1;
                if (__pyx_t_47 < 0) {
                  __pyx_t_47 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                  if (unlikely(__pyx_t_47 < 0)) __pyx_t_12 = 0;
                } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_12 = 0;
                if (unlikely(__pyx_t_12 != -1)) {
                  __Pyx_RaiseBufferIndexError(__pyx_t_12);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
                }
                *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                /* "pandas/tslib.pyx":1119
 *                     if coerce:
 *                         iresult[i] = iNaT
 *                         continue             # <<<<<<<<<<<<<<
 *                     raise
 * 
 */
                goto __pyx_L98_except_continue;
                goto __pyx_L99;
              }
              __pyx_L99:;

              /* "pandas/tslib.pyx":1120
 *                         iresult[i] = iNaT
 *                         continue
 *                     raise             # <<<<<<<<<<<<<<
 * 
 *         # don't allow mixed integers and datetime like
 */
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_10);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_ErrRestore(__pyx_t_3, __pyx_t_10, __pyx_t_9);
              __pyx_t_3 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; 
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L65_exception_handled;
              __pyx_L98_except_continue:;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L70_try_continue;
            }
            __pyx_L66_except_error:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
            goto __pyx_L3_error;
            __pyx_L70_try_continue:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
            goto __pyx_L11_continue;
            __pyx_L65_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
            __pyx_L71_try_end:;
          }
        }
        __pyx_L13:;
        __pyx_L11_continue:;
      }

      /* "pandas/tslib.pyx":1125
 *         # higher levels can catch and coerce to object, for
 *         # example
 *         if seen_integer and seen_datetime:             # <<<<<<<<<<<<<<
 *             raise ValueError("mixed datetimes and integers in passed array")
 * 
 */
      if (__pyx_v_seen_integer) {
        __pyx_t_32 = __pyx_v_seen_datetime;
      } else {
        __pyx_t_32 = __pyx_v_seen_integer;
      }
      if (__pyx_t_32) {

        /* "pandas/tslib.pyx":1126
 *         # example
 *         if seen_integer and seen_datetime:
 *             raise ValueError("mixed datetimes and integers in passed array")             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
        __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_64), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        goto __pyx_L100;
      }
      __pyx_L100:;

      /* "pandas/tslib.pyx":1128
 *             raise ValueError("mixed datetimes and integers in passed array")
 * 
 *         return result             # <<<<<<<<<<<<<<
 *     except OutOfBoundsDatetime:
 *         if raise_:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0;
    __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0;
    __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":1129
 * 
 *         return result
 *     except OutOfBoundsDatetime:             # <<<<<<<<<<<<<<
 *         if raise_:
 *             raise
 */
    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__OutOfBoundsDatetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = PyErr_ExceptionMatches(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":1130
 *         return result
 *     except OutOfBoundsDatetime:
 *         if raise_:             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
      __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      if (__pyx_t_32) {

        /* "pandas/tslib.pyx":1131
 *     except OutOfBoundsDatetime:
 *         if raise_:
 *             raise             # <<<<<<<<<<<<<<
 * 
 *         oresult = np.empty(n, dtype=object)
 */
        __Pyx_GIVEREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_3);
        __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_3 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        goto __pyx_L103;
      }
      __pyx_L103:;

      /* "pandas/tslib.pyx":1133
 *             raise
 * 
 *         oresult = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             val = values[i]
 */
      __pyx_t_43 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_43);
      __pyx_t_42 = PyObject_GetAttr(__pyx_t_43, __pyx_n_s__empty); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_42);
      __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
      __pyx_t_43 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_43);
      __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_41);
      PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43);
      __Pyx_GIVEREF(__pyx_t_43);
      __pyx_t_43 = 0;
      __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_43));
      if (PyDict_SetItem(__pyx_t_43, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __pyx_t_8 = PyObject_Call(__pyx_t_42, ((PyObject *)__pyx_t_41), ((PyObject *)__pyx_t_43)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0;
      if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __pyx_t_48 = ((PyArrayObject *)__pyx_t_8);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer);
        __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_12 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_oresult, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
        }
        __pyx_pybuffernd_oresult.diminfo[0].strides = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oresult.diminfo[0].shape = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      }
      __pyx_t_48 = 0;
      __pyx_v_oresult = ((PyArrayObject *)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "pandas/tslib.pyx":1134
 * 
 *         oresult = np.empty(n, dtype=object)
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if util.is_datetime64_object(val):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) {
        __pyx_v_i = __pyx_t_16;

        /* "pandas/tslib.pyx":1135
 *         oresult = np.empty(n, dtype=object)
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             if util.is_datetime64_object(val):
 *                 oresult[i] = val.item()
 */
        __pyx_t_49 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_49 < 0) {
          __pyx_t_49 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_49 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        }
        __pyx_t_8 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_values.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_8);
        __Pyx_XDECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "pandas/tslib.pyx":1136
 *         for i in range(n):
 *             val = values[i]
 *             if util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *                 oresult[i] = val.item()
 *             else:
 */
        __pyx_t_12 = is_datetime64_object(__pyx_v_val);
        if (__pyx_t_12) {

          /* "pandas/tslib.pyx":1137
 *             val = values[i]
 *             if util.is_datetime64_object(val):
 *                 oresult[i] = val.item()             # <<<<<<<<<<<<<<
 *             else:
 *                 oresult[i] = val
 */
          __pyx_t_8 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_43 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_43);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_50 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_50 < 0) {
            __pyx_t_50 += __pyx_pybuffernd_oresult.diminfo[0].shape;
            if (unlikely(__pyx_t_50 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_50 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          }
          __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_oresult.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_51);
          __Pyx_INCREF(__pyx_t_43); __Pyx_DECREF(*__pyx_t_51);
          *__pyx_t_51 = __pyx_t_43;
          __Pyx_GIVEREF(*__pyx_t_51);
          __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
          goto __pyx_L106;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1139
 *                 oresult[i] = val.item()
 *             else:
 *                 oresult[i] = val             # <<<<<<<<<<<<<<
 *         return oresult
 *     except TypeError:
 */
          __pyx_t_52 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_52 < 0) {
            __pyx_t_52 += __pyx_pybuffernd_oresult.diminfo[0].shape;
            if (unlikely(__pyx_t_52 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          }
          __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_oresult.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_51);
          __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_51);
          *__pyx_t_51 = __pyx_v_val;
          __Pyx_GIVEREF(*__pyx_t_51);
        }
        __pyx_L106:;
      }

      /* "pandas/tslib.pyx":1140
 *             else:
 *                 oresult[i] = val
 *         return oresult             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         oresult = np.empty(n, dtype=object)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_oresult));
      __pyx_r = ((PyObject *)__pyx_v_oresult);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L4_exception_handled;
    }

    /* "pandas/tslib.pyx":1141
 *                 oresult[i] = val
 *         return oresult
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         oresult = np.empty(n, dtype=object)
 * 
 */
    __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_10, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_9);

      /* "pandas/tslib.pyx":1142
 *         return oresult
 *     except TypeError:
 *         oresult = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __pyx_t_43 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_43);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_43, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
      __pyx_t_43 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_43);
      __pyx_t_41 = PyTuple_New(1); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_41);
      PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_43);
      __Pyx_GIVEREF(__pyx_t_43);
      __pyx_t_43 = 0;
      __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_43));
      if (PyDict_SetItem(__pyx_t_43, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __pyx_t_42 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_41), ((PyObject *)__pyx_t_43)); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_42);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0;
      if (!(likely(((__pyx_t_42) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_42, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __pyx_t_48 = ((PyArrayObject *)__pyx_t_42);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer);
        __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_48, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_12 < 0)) {
          PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_oresult, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
          }
        }
        __pyx_pybuffernd_oresult.diminfo[0].strides = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oresult.diminfo[0].shape = __pyx_pybuffernd_oresult.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      }
      __pyx_t_48 = 0;
      __pyx_v_oresult = ((PyArrayObject *)__pyx_t_42);
      __pyx_t_42 = 0;

      /* "pandas/tslib.pyx":1144
 *         oresult = np.empty(n, dtype=object)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if _checknull_with_nat(val):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_1; __pyx_t_16+=1) {
        __pyx_v_i = __pyx_t_16;

        /* "pandas/tslib.pyx":1145
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             if _checknull_with_nat(val):
 *                 oresult[i] = val
 */
        __pyx_t_53 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_53 < 0) {
          __pyx_t_53 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_53 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        }
        __pyx_t_42 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd_values.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_42);
        __Pyx_XDECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_42;
        __pyx_t_42 = 0;

        /* "pandas/tslib.pyx":1146
 *         for i in range(n):
 *             val = values[i]
 *             if _checknull_with_nat(val):             # <<<<<<<<<<<<<<
 *                 oresult[i] = val
 *             elif util.is_string_object(val):
 */
        __pyx_t_32 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val);
        if (__pyx_t_32) {

          /* "pandas/tslib.pyx":1147
 *             val = values[i]
 *             if _checknull_with_nat(val):
 *                 oresult[i] = val             # <<<<<<<<<<<<<<
 *             elif util.is_string_object(val):
 *                 if len(val) == 0:
 */
          __pyx_t_54 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_54 < 0) {
            __pyx_t_54 += __pyx_pybuffernd_oresult.diminfo[0].shape;
            if (unlikely(__pyx_t_54 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          }
          __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_oresult.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_51);
          __Pyx_INCREF(__pyx_v_val); __Pyx_DECREF(*__pyx_t_51);
          *__pyx_t_51 = __pyx_v_val;
          __Pyx_GIVEREF(*__pyx_t_51);
          goto __pyx_L111;
        }

        /* "pandas/tslib.pyx":1148
 *             if _checknull_with_nat(val):
 *                 oresult[i] = val
 *             elif util.is_string_object(val):             # <<<<<<<<<<<<<<
 *                 if len(val) == 0:
 *                     # TODO: ??
 */
        __pyx_t_12 = is_string_object(__pyx_v_val);
        if (__pyx_t_12) {

          /* "pandas/tslib.pyx":1149
 *                 oresult[i] = val
 *             elif util.is_string_object(val):
 *                 if len(val) == 0:             # <<<<<<<<<<<<<<
 *                     # TODO: ??
 *                     oresult[i] = 'NaT'
 */
          __pyx_t_55 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_55 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __pyx_t_32 = (__pyx_t_55 == 0);
          if (__pyx_t_32) {

            /* "pandas/tslib.pyx":1151
 *                 if len(val) == 0:
 *                     # TODO: ??
 *                     oresult[i] = 'NaT'             # <<<<<<<<<<<<<<
 *                     continue
 *                 try:
 */
            __pyx_t_55 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_55 < 0) {
              __pyx_t_55 += __pyx_pybuffernd_oresult.diminfo[0].shape;
              if (unlikely(__pyx_t_55 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0;
            if (unlikely(__pyx_t_12 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_12);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
            }
            __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_oresult.diminfo[0].strides);
            __Pyx_GOTREF(*__pyx_t_51);
            __Pyx_INCREF(__pyx_n_s__NaT); __Pyx_DECREF(*__pyx_t_51);
            *__pyx_t_51 = __pyx_n_s__NaT;
            __Pyx_GIVEREF(*__pyx_t_51);

            /* "pandas/tslib.pyx":1152
 *                     # TODO: ??
 *                     oresult[i] = 'NaT'
 *                     continue             # <<<<<<<<<<<<<<
 *                 try:
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)
 */
            goto __pyx_L109_continue;
            goto __pyx_L112;
          }
          __pyx_L112:;

          /* "pandas/tslib.pyx":1153
 *                     oresult[i] = 'NaT'
 *                     continue
 *                 try:             # <<<<<<<<<<<<<<
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)
 *                     _pydatetime_to_dts(oresult[i], &dts)
 */
          {
            __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_15);
            /*try:*/ {

              /* "pandas/tslib.pyx":1154
 *                     continue
 *                 try:
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)             # <<<<<<<<<<<<<<
 *                     _pydatetime_to_dts(oresult[i], &dts)
 *                     _check_dts_bounds(&dts)
 */
              __pyx_t_42 = __Pyx_GetName(__pyx_m, __pyx_n_s_62); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_42);
              __pyx_t_43 = PyTuple_New(1); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_43);
              __Pyx_INCREF(__pyx_v_val);
              PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_v_val);
              __Pyx_GIVEREF(__pyx_v_val);
              __pyx_t_41 = PyDict_New(); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(((PyObject *)__pyx_t_41));
              if (PyDict_SetItem(__pyx_t_41, ((PyObject *)__pyx_n_s__dayfirst), __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __pyx_t_8 = PyObject_Call(__pyx_t_42, ((PyObject *)__pyx_t_43), ((PyObject *)__pyx_t_41)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 0;
              __pyx_t_56 = __pyx_v_i;
              __pyx_t_12 = -1;
              if (__pyx_t_56 < 0) {
                __pyx_t_56 += __pyx_pybuffernd_oresult.diminfo[0].shape;
                if (unlikely(__pyx_t_56 < 0)) __pyx_t_12 = 0;
              } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0;
              if (unlikely(__pyx_t_12 != -1)) {
                __Pyx_RaiseBufferIndexError(__pyx_t_12);
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              }
              __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_oresult.diminfo[0].strides);
              __Pyx_GOTREF(*__pyx_t_51);
              __Pyx_INCREF(__pyx_t_8); __Pyx_DECREF(*__pyx_t_51);
              *__pyx_t_51 = __pyx_t_8;
              __Pyx_GIVEREF(*__pyx_t_51);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

              /* "pandas/tslib.pyx":1155
 *                 try:
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)
 *                     _pydatetime_to_dts(oresult[i], &dts)             # <<<<<<<<<<<<<<
 *                     _check_dts_bounds(&dts)
 *                 except Exception:
 */
              __pyx_t_57 = __pyx_v_i;
              __pyx_t_12 = -1;
              if (__pyx_t_57 < 0) {
                __pyx_t_57 += __pyx_pybuffernd_oresult.diminfo[0].shape;
                if (unlikely(__pyx_t_57 < 0)) __pyx_t_12 = 0;
              } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_oresult.diminfo[0].shape)) __pyx_t_12 = 0;
              if (unlikely(__pyx_t_12 != -1)) {
                __Pyx_RaiseBufferIndexError(__pyx_t_12);
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              }
              __pyx_t_8 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_oresult.diminfo[0].strides);
              __Pyx_INCREF((PyObject*)__pyx_t_8);
              __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_8, (&__pyx_v_dts));
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

              /* "pandas/tslib.pyx":1156
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)
 *                     _pydatetime_to_dts(oresult[i], &dts)
 *                     _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     if raise_:
 */
              __pyx_t_8 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            }
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            goto __pyx_L120_try_end;
            __pyx_L113_error:;
            __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0;
            __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0;
            __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "pandas/tslib.pyx":1157
 *                     _pydatetime_to_dts(oresult[i], &dts)
 *                     _check_dts_bounds(&dts)
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     if raise_:
 *                         raise
 */
            __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
            if (__pyx_t_12) {
              __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_41, &__pyx_t_43) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_GOTREF(__pyx_t_41);
              __Pyx_GOTREF(__pyx_t_43);

              /* "pandas/tslib.pyx":1158
 *                     _check_dts_bounds(&dts)
 *                 except Exception:
 *                     if raise_:             # <<<<<<<<<<<<<<
 *                         raise
 *                     return values
 */
              __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
              if (__pyx_t_32) {

                /* "pandas/tslib.pyx":1159
 *                 except Exception:
 *                     if raise_:
 *                         raise             # <<<<<<<<<<<<<<
 *                     return values
 *                     # oresult[i] = val
 */
                __Pyx_GIVEREF(__pyx_t_8);
                __Pyx_GIVEREF(__pyx_t_41);
                __Pyx_GIVEREF(__pyx_t_43);
                __Pyx_ErrRestore(__pyx_t_8, __pyx_t_41, __pyx_t_43);
                __pyx_t_8 = 0; __pyx_t_41 = 0; __pyx_t_43 = 0; 
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
                goto __pyx_L123;
              }
              __pyx_L123:;

              /* "pandas/tslib.pyx":1160
 *                     if raise_:
 *                         raise
 *                     return values             # <<<<<<<<<<<<<<
 *                     # oresult[i] = val
 *             else:
 */
              __Pyx_XDECREF(__pyx_r);
              __Pyx_INCREF(((PyObject *)__pyx_v_values));
              __pyx_r = ((PyObject *)__pyx_v_values);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
              __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
              goto __pyx_L116_except_return;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
              __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
              goto __pyx_L114_exception_handled;
            }
            __pyx_L115_except_error:;
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
            goto __pyx_L5_except_error;
            __pyx_L116_except_return:;
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
            goto __pyx_L6_except_return;
            __pyx_L114_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
            __pyx_L120_try_end:;
          }
          goto __pyx_L111;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1163
 *                     # oresult[i] = val
 *             else:
 *                 if raise_:             # <<<<<<<<<<<<<<
 *                     raise
 *                 return values
 */
          __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          if (__pyx_t_32) {

            /* "pandas/tslib.pyx":1164
 *             else:
 *                 if raise_:
 *                     raise             # <<<<<<<<<<<<<<
 *                 return values
 * 
 */
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_10);
            __Pyx_GIVEREF(__pyx_t_9);
            __Pyx_ErrRestore(__pyx_t_3, __pyx_t_10, __pyx_t_9);
            __pyx_t_3 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; 
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
            goto __pyx_L124;
          }
          __pyx_L124:;

          /* "pandas/tslib.pyx":1165
 *                 if raise_:
 *                     raise
 *                 return values             # <<<<<<<<<<<<<<
 * 
 *         return oresult
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(((PyObject *)__pyx_v_values));
          __pyx_r = ((PyObject *)__pyx_v_values);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L6_except_return;
        }
        __pyx_L111:;
        __pyx_L109_continue:;
      }

      /* "pandas/tslib.pyx":1167
 *                 return values
 * 
 *         return oresult             # <<<<<<<<<<<<<<
 * 
 * def array_to_timedelta64(ndarray[object] values, coerce=False):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_oresult));
      __pyx_r = ((PyObject *)__pyx_v_oresult);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_41);
  __Pyx_XDECREF(__pyx_t_42);
  __Pyx_XDECREF(__pyx_t_43);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oresult.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_iresult);
  __Pyx_XDECREF((PyObject *)__pyx_v_oresult);
  __Pyx_XDECREF((PyObject *)__pyx_v__ts);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_29array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_28array_to_timedelta64[] = " convert an ndarray to an array of ints that are timedeltas\n        force conversion if coerce = True,\n        else will raise if cannot convert ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_29array_to_timedelta64 = {__Pyx_NAMESTR("array_to_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_29array_to_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_28array_to_timedelta64)};
static PyObject *__pyx_pw_6pandas_5tslib_29array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_coerce = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_to_timedelta64 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__coerce,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_65;
    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__coerce);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_to_timedelta64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __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_coerce = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_to_timedelta64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.array_to_timedelta64", __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[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_28array_to_timedelta64(__pyx_self, __pyx_v_values, __pyx_v_coerce);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1169
 *         return oresult
 * 
 * def array_to_timedelta64(ndarray[object] values, coerce=False):             # <<<<<<<<<<<<<<
 *     """ convert an ndarray to an array of ints that are timedeltas
 *         force conversion if coerce = True,
 */

static PyObject *__pyx_pf_6pandas_5tslib_28array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_iresult = 0;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult;
  __Pyx_Buffer __pyx_pybuffer_iresult;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_to_timedelta64", 0);
  __pyx_pybuffer_iresult.pybuffer.buf = NULL;
  __pyx_pybuffer_iresult.refcount = 0;
  __pyx_pybuffernd_iresult.data = NULL;
  __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult;
  __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[0]; __pyx_lineno = 1169; __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/tslib.pyx":1177
 *         ndarray[int64_t] iresult
 * 
 *     n = values.shape[0]             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='m8[ns]')
 *     iresult = result.view('i8')
 */
  __pyx_v_n = (__pyx_v_values->dimensions[0]);

  /* "pandas/tslib.pyx":1178
 * 
 *     n = values.shape[0]
 *     result = np.empty(n, dtype='m8[ns]')             # <<<<<<<<<<<<<<
 *     iresult = result.view('i8')
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __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_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_66)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1179
 *     n = values.shape[0]
 *     result = np.empty(n, dtype='m8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_iresult = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1181
 *     iresult = result.view('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         result[i] = convert_to_timedelta64(values[i], 'ns', coerce)
 *     return iresult
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/tslib.pyx":1182
 * 
 *     for i in range(n):
 *         result[i] = convert_to_timedelta64(values[i], 'ns', coerce)             # <<<<<<<<<<<<<<
 *     return iresult
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __pyx_t_4 = ((PyObject *)__pyx_n_s__ns);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_t_1, __pyx_t_4, __pyx_v_coerce); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __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;
    if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "pandas/tslib.pyx":1183
 *     for i in range(n):
 *         result[i] = convert_to_timedelta64(values[i], 'ns', coerce)
 *     return iresult             # <<<<<<<<<<<<<<
 * 
 * def convert_to_timedelta(object ts, object unit='ns', coerce=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_iresult));
  __pyx_r = ((PyObject *)__pyx_v_iresult);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_31convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_31convert_to_timedelta = {__Pyx_NAMESTR("convert_to_timedelta"), (PyCFunction)__pyx_pw_6pandas_5tslib_31convert_to_timedelta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_31convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_v_coerce = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_to_timedelta (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ts,&__pyx_n_s__unit,&__pyx_n_s__coerce,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_n_s__ns);
    values[2] = __pyx_k_68;
    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__ts)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert_to_timedelta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ts = values[0];
    __pyx_v_unit = values[1];
    __pyx_v_coerce = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_to_timedelta", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.convert_to_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_30convert_to_timedelta(__pyx_self, __pyx_v_ts, __pyx_v_unit, __pyx_v_coerce);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1185
 *     return iresult
 * 
 * def convert_to_timedelta(object ts, object unit='ns', coerce=False):             # <<<<<<<<<<<<<<
 *     return convert_to_timedelta64(ts, unit, coerce)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_30convert_to_timedelta(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_to_timedelta", 0);

  /* "pandas/tslib.pyx":1186
 * 
 * def convert_to_timedelta(object ts, object unit='ns', coerce=False):
 *     return convert_to_timedelta64(ts, unit, coerce)             # <<<<<<<<<<<<<<
 * 
 * cdef convert_to_timedelta64(object ts, object unit, object coerce):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5tslib_convert_to_timedelta64(__pyx_v_ts, __pyx_v_unit, __pyx_v_coerce); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":1188
 *     return convert_to_timedelta64(ts, unit, coerce)
 * 
 * cdef convert_to_timedelta64(object ts, object unit, object coerce):             # <<<<<<<<<<<<<<
 *     """
 *     Convert an incoming object to a timedelta64 if possible
 */

static PyObject *__pyx_f_6pandas_5tslib_convert_to_timedelta64(PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, PyObject *__pyx_v_coerce) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_to_timedelta64", 0);
  __Pyx_INCREF(__pyx_v_ts);

  /* "pandas/tslib.pyx":1205
 *     # handle the numpy < 1.7 case
 *     """
 *     if _checknull_with_nat(ts):             # <<<<<<<<<<<<<<
 *         ts = np.timedelta64(iNaT)
 *     elif util.is_datetime64_object(ts):
 */
  __pyx_t_1 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_ts);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1206
 *     """
 *     if _checknull_with_nat(ts):
 *         ts = np.timedelta64(iNaT)             # <<<<<<<<<<<<<<
 *     elif util.is_datetime64_object(ts):
 *         # only accept a NaT here
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_ts);
    __pyx_v_ts = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1207
 *     if _checknull_with_nat(ts):
 *         ts = np.timedelta64(iNaT)
 *     elif util.is_datetime64_object(ts):             # <<<<<<<<<<<<<<
 *         # only accept a NaT here
 *         if ts.astype('int64') == iNaT:
 */
  __pyx_t_5 = is_datetime64_object(__pyx_v_ts);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1209
 *     elif util.is_datetime64_object(ts):
 *         # only accept a NaT here
 *         if ts.astype('int64') == iNaT:             # <<<<<<<<<<<<<<
 *             ts = np.timedelta64(iNaT)
 *     elif isinstance(ts, np.timedelta64):
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":1210
 *         # only accept a NaT here
 *         if ts.astype('int64') == iNaT:
 *             ts = np.timedelta64(iNaT)             # <<<<<<<<<<<<<<
 *     elif isinstance(ts, np.timedelta64):
 *         ts = ts.astype("m8[{0}]".format(unit.lower()))
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __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_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __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[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_ts);
      __pyx_v_ts = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1211
 *         if ts.astype('int64') == iNaT:
 *             ts = np.timedelta64(iNaT)
 *     elif isinstance(ts, np.timedelta64):             # <<<<<<<<<<<<<<
 *         ts = ts.astype("m8[{0}]".format(unit.lower()))
 *     elif is_integer_object(ts):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1212
 *             ts = np.timedelta64(iNaT)
 *     elif isinstance(ts, np.timedelta64):
 *         ts = ts.astype("m8[{0}]".format(unit.lower()))             # <<<<<<<<<<<<<<
 *     elif is_integer_object(ts):
 *         if ts == iNaT:
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_70), __pyx_n_s__format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_unit, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_ts);
    __pyx_v_ts = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1213
 *     elif isinstance(ts, np.timedelta64):
 *         ts = ts.astype("m8[{0}]".format(unit.lower()))
 *     elif is_integer_object(ts):             # <<<<<<<<<<<<<<
 *         if ts == iNaT:
 *             ts = np.timedelta64(iNaT)
 */
  __pyx_t_5 = is_integer_object(__pyx_v_ts);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1214
 *         ts = ts.astype("m8[{0}]".format(unit.lower()))
 *     elif is_integer_object(ts):
 *         if ts == iNaT:             # <<<<<<<<<<<<<<
 *             ts = np.timedelta64(iNaT)
 *         else:
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_ts, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":1215
 *     elif is_integer_object(ts):
 *         if ts == iNaT:
 *             ts = np.timedelta64(iNaT)             # <<<<<<<<<<<<<<
 *         else:
 *             if util.is_array(ts):
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __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_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_v_ts);
      __pyx_v_ts = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1217
 *             ts = np.timedelta64(iNaT)
 *         else:
 *             if util.is_array(ts):             # <<<<<<<<<<<<<<
 *                 ts = ts.astype('int64').item()
 *             ts = cast_from_unit(ts, unit)
 */
      __pyx_t_2 = __pyx_f_4util_is_array(__pyx_v_ts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pandas/tslib.pyx":1218
 *         else:
 *             if util.is_array(ts):
 *                 ts = ts.astype('int64').item()             # <<<<<<<<<<<<<<
 *             ts = cast_from_unit(ts, unit)
 *             if _np_version_under1p7:
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_v_ts);
        __pyx_v_ts = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "pandas/tslib.pyx":1219
 *             if util.is_array(ts):
 *                 ts = ts.astype('int64').item()
 *             ts = cast_from_unit(ts, unit)             # <<<<<<<<<<<<<<
 *             if _np_version_under1p7:
 *                 ts = timedelta(microseconds=ts/1000.0)
 */
      __pyx_t_7 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_v_ts);
      __pyx_v_ts = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":1220
 *                 ts = ts.astype('int64').item()
 *             ts = cast_from_unit(ts, unit)
 *             if _np_version_under1p7:             # <<<<<<<<<<<<<<
 *                 ts = timedelta(microseconds=ts/1000.0)
 *             else:
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_72); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __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[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "pandas/tslib.pyx":1221
 *             ts = cast_from_unit(ts, unit)
 *             if _np_version_under1p7:
 *                 ts = timedelta(microseconds=ts/1000.0)             # <<<<<<<<<<<<<<
 *             else:
 *                 ts = np.timedelta64(ts)
 */
        __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
        __pyx_t_2 = PyFloat_FromDouble(1000.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_v_ts, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__microseconds), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_v_ts);
        __pyx_v_ts = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":1223
 *                 ts = timedelta(microseconds=ts/1000.0)
 *             else:
 *                 ts = np.timedelta64(ts)             # <<<<<<<<<<<<<<
 * 
 *     if _np_version_under1p7:
 */
        __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __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[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_ts);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ts);
        __Pyx_GIVEREF(__pyx_v_ts);
        __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_v_ts);
        __pyx_v_ts = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_L7:;
    }
    __pyx_L5:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1225
 *                 ts = np.timedelta64(ts)
 * 
 *     if _np_version_under1p7:             # <<<<<<<<<<<<<<
 *         if not isinstance(ts, timedelta):
 *             if coerce:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_72); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1226
 * 
 *     if _np_version_under1p7:
 *         if not isinstance(ts, timedelta):             # <<<<<<<<<<<<<<
 *             if coerce:
 *                 return np.timedelta64(iNaT)
 */
    __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta));
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ts, __pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = (!__pyx_t_1);
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":1227
 *     if _np_version_under1p7:
 *         if not isinstance(ts, timedelta):
 *             if coerce:             # <<<<<<<<<<<<<<
 *                 return np.timedelta64(iNaT)
 *             raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 */
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

        /* "pandas/tslib.pyx":1228
 *         if not isinstance(ts, timedelta):
 *             if coerce:
 *                 return np.timedelta64(iNaT)             # <<<<<<<<<<<<<<
 *             raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 *         if not PY2:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __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_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "pandas/tslib.pyx":1229
 *             if coerce:
 *                 return np.timedelta64(iNaT)
 *             raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))             # <<<<<<<<<<<<<<
 *         if not PY2:
 *             # convert to microseconds in timedelta64
 */
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_73), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "pandas/tslib.pyx":1230
 *                 return np.timedelta64(iNaT)
 *             raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 *         if not PY2:             # <<<<<<<<<<<<<<
 *             # convert to microseconds in timedelta64
 *             ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000))
 */
    __pyx_t_8 = (!__pyx_v_6pandas_5tslib_PY2);
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":1232
 *         if not PY2:
 *             # convert to microseconds in timedelta64
 *             ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000))             # <<<<<<<<<<<<<<
 *         else:
 *             return ts
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__total_seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyFloat_FromDouble(1e9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__microseconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_int_1000); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __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_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_v_ts);
      __pyx_v_ts = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1234
 *             ts = np.timedelta64(int(ts.total_seconds()*1e9 + ts.microseconds*1000))
 *         else:
 *             return ts             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(ts, timedelta):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_ts);
      __pyx_r = __pyx_v_ts;
      goto __pyx_L0;
    }
    __pyx_L11:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "pandas/tslib.pyx":1236
 *             return ts
 * 
 *     if isinstance(ts, timedelta):             # <<<<<<<<<<<<<<
 *         ts = np.timedelta64(ts)
 *     elif not isinstance(ts, np.timedelta64):
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_ts, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":1237
 * 
 *     if isinstance(ts, timedelta):
 *         ts = np.timedelta64(ts)             # <<<<<<<<<<<<<<
 *     elif not isinstance(ts, np.timedelta64):
 *         if coerce:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_ts);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ts);
    __Pyx_GIVEREF(__pyx_v_ts);
    __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_ts);
    __pyx_v_ts = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L12;
  }

  /* "pandas/tslib.pyx":1238
 *     if isinstance(ts, timedelta):
 *         ts = np.timedelta64(ts)
 *     elif not isinstance(ts, np.timedelta64):             # <<<<<<<<<<<<<<
 *         if coerce:
 *             return np.timedelta64(iNaT)
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_ts, __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = (!__pyx_t_8);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1239
 *         ts = np.timedelta64(ts)
 *     elif not isinstance(ts, np.timedelta64):
 *         if coerce:             # <<<<<<<<<<<<<<
 *             return np.timedelta64(iNaT)
 *         raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":1240
 *     elif not isinstance(ts, np.timedelta64):
 *         if coerce:
 *             return np.timedelta64(iNaT)             # <<<<<<<<<<<<<<
 *         raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 *     return ts.astype('timedelta64[ns]')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timedelta64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "pandas/tslib.pyx":1241
 *         if coerce:
 *             return np.timedelta64(iNaT)
 *         raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))             # <<<<<<<<<<<<<<
 *     return ts.astype('timedelta64[ns]')
 * 
 */
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_73), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "pandas/tslib.pyx":1242
 *             return np.timedelta64(iNaT)
 *         raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 *     return ts.astype('timedelta64[ns]')             # <<<<<<<<<<<<<<
 * 
 * def repr_timedelta64(object value, format=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_ts, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_33repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_32repr_timedelta64[] = "\n    provide repr for timedelta64\n\n    Parameters\n    ----------\n    value : timedelta64\n    format : None|\"short\"|\"long\"\n\n    Returns\n    -------\n    converted : Timestamp\n\n   ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_33repr_timedelta64 = {__Pyx_NAMESTR("repr_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_33repr_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_32repr_timedelta64)};
static PyObject *__pyx_pw_6pandas_5tslib_33repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("repr_timedelta64 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__format,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":1244
 *     return ts.astype('timedelta64[ns]')
 * 
 * def repr_timedelta64(object value, format=None):             # <<<<<<<<<<<<<<
 *    """
 *     provide repr for timedelta64
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "repr_timedelta64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __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_value = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("repr_timedelta64", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.repr_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_32repr_timedelta64(__pyx_self, __pyx_v_value, __pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_32repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
  PyObject *__pyx_v_ivalue = 0;
  PyObject *__pyx_v_frac = NULL;
  PyObject *__pyx_v_sign = NULL;
  PyObject *__pyx_v_days = NULL;
  PyObject *__pyx_v_hours = NULL;
  PyObject *__pyx_v_minutes = NULL;
  PyObject *__pyx_v_seconds = NULL;
  PyObject *__pyx_v_seconds_pretty = NULL;
  PyObject *__pyx_v_sp = NULL;
  PyObject *__pyx_v_sign_pretty = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("repr_timedelta64", 0);

  /* "pandas/tslib.pyx":1260
 *    cdef object ivalue
 * 
 *    ivalue = value.view('i8')             # <<<<<<<<<<<<<<
 * 
 *    # put frac in seconds
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ivalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":1263
 * 
 *    # put frac in seconds
 *    frac   = float(ivalue)/1e9             # <<<<<<<<<<<<<<
 *    sign   = np.sign(frac)
 *    frac   = np.abs(frac)
 */
  __pyx_t_3 = __Pyx_PyObject_AsDouble(__pyx_v_ivalue); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyFloat_FromDouble((__pyx_t_3 / 1e9)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_frac = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":1264
 *    # put frac in seconds
 *    frac   = float(ivalue)/1e9
 *    sign   = np.sign(frac)             # <<<<<<<<<<<<<<
 *    frac   = np.abs(frac)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__sign); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_frac);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_frac);
  __Pyx_GIVEREF(__pyx_v_frac);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_sign = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1265
 *    frac   = float(ivalue)/1e9
 *    sign   = np.sign(frac)
 *    frac   = np.abs(frac)             # <<<<<<<<<<<<<<
 * 
 *    if frac >= 86400:
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__abs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __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[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_frac);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_frac);
  __Pyx_GIVEREF(__pyx_v_frac);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_v_frac);
  __pyx_v_frac = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1267
 *    frac   = np.abs(frac)
 * 
 *    if frac >= 86400:             # <<<<<<<<<<<<<<
 *       days   = int(frac / 86400)
 *       frac  -= days * 86400
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_86400, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1268
 * 
 *    if frac >= 86400:
 *       days   = int(frac / 86400)             # <<<<<<<<<<<<<<
 *       frac  -= days * 86400
 *    else:
 */
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_86400); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __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*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_days = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":1269
 *    if frac >= 86400:
 *       days   = int(frac / 86400)
 *       frac  -= days * 86400             # <<<<<<<<<<<<<<
 *    else:
 *       days   = 0
 */
    __pyx_t_1 = PyNumber_Multiply(__pyx_v_days, __pyx_int_86400); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_frac);
    __pyx_v_frac = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1271
 *       frac  -= days * 86400
 *    else:
 *       days   = 0             # <<<<<<<<<<<<<<
 * 
 *    if frac >= 3600:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_days = __pyx_int_0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1273
 *       days   = 0
 * 
 *    if frac >= 3600:             # <<<<<<<<<<<<<<
 *       hours  = int(frac / 3600)
 *       frac  -= hours * 3600
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_3600, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1274
 * 
 *    if frac >= 3600:
 *       hours  = int(frac / 3600)             # <<<<<<<<<<<<<<
 *       frac  -= hours * 3600
 *    else:
 */
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_3600); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v_hours = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":1275
 *    if frac >= 3600:
 *       hours  = int(frac / 3600)
 *       frac  -= hours * 3600             # <<<<<<<<<<<<<<
 *    else:
 *       hours  = 0
 */
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_hours, __pyx_int_3600); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_frac);
    __pyx_v_frac = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1277
 *       frac  -= hours * 3600
 *    else:
 *       hours  = 0             # <<<<<<<<<<<<<<
 * 
 *    if frac >= 60:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_hours = __pyx_int_0;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1279
 *       hours  = 0
 * 
 *    if frac >= 60:             # <<<<<<<<<<<<<<
 *       minutes = int(frac / 60)
 *       frac   -= minutes * 60
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_60, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1280
 * 
 *    if frac >= 60:
 *       minutes = int(frac / 60)             # <<<<<<<<<<<<<<
 *       frac   -= minutes * 60
 *    else:
 */
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_frac, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __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*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_minutes = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":1281
 *    if frac >= 60:
 *       minutes = int(frac / 60)
 *       frac   -= minutes * 60             # <<<<<<<<<<<<<<
 *    else:
 *       minutes  = 0
 */
    __pyx_t_1 = PyNumber_Multiply(__pyx_v_minutes, __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_frac);
    __pyx_v_frac = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1283
 *       frac   -= minutes * 60
 *    else:
 *       minutes  = 0             # <<<<<<<<<<<<<<
 * 
 *    if frac >= 1:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_minutes = __pyx_int_0;
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":1285
 *       minutes  = 0
 * 
 *    if frac >= 1:             # <<<<<<<<<<<<<<
 *       seconds = int(frac)
 *       frac   -= seconds
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_frac, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1286
 * 
 *    if frac >= 1:
 *       seconds = int(frac)             # <<<<<<<<<<<<<<
 *       frac   -= seconds
 *    else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_frac);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_frac);
    __Pyx_GIVEREF(__pyx_v_frac);
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_seconds = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":1287
 *    if frac >= 1:
 *       seconds = int(frac)
 *       frac   -= seconds             # <<<<<<<<<<<<<<
 *    else:
 *       seconds = 0
 */
    __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_frac, __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_frac);
    __pyx_v_frac = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1289
 *       frac   -= seconds
 *    else:
 *       seconds = 0             # <<<<<<<<<<<<<<
 * 
 *    if frac == int(frac):
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_seconds = __pyx_int_0;
  }
  __pyx_L6:;

  /* "pandas/tslib.pyx":1291
 *       seconds = 0
 * 
 *    if frac == int(frac):             # <<<<<<<<<<<<<<
 *       seconds_pretty = "%02d" % seconds
 *    else:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_frac);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_frac);
  __Pyx_GIVEREF(__pyx_v_frac);
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_frac, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1292
 * 
 *    if frac == int(frac):
 *       seconds_pretty = "%02d" % seconds             # <<<<<<<<<<<<<<
 *    else:
 *       sp = abs(round(1e6*frac))
 */
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_76), __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_v_seconds_pretty = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1294
 *       seconds_pretty = "%02d" % seconds
 *    else:
 *       sp = abs(round(1e6*frac))             # <<<<<<<<<<<<<<
 *       seconds_pretty = "%02d.%06d" % (seconds, sp)
 * 
 */
    __pyx_t_1 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_frac); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __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[0]; __pyx_lineno = 1294; __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_builtin_round, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_sp = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":1295
 *    else:
 *       sp = abs(round(1e6*frac))
 *       seconds_pretty = "%02d.%06d" % (seconds, sp)             # <<<<<<<<<<<<<<
 * 
 *    if sign < 0:
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_seconds);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_seconds);
    __Pyx_GIVEREF(__pyx_v_seconds);
    __Pyx_INCREF(__pyx_v_sp);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sp);
    __Pyx_GIVEREF(__pyx_v_sp);
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_77), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v_seconds_pretty = ((PyObject *)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L7:;

  /* "pandas/tslib.pyx":1297
 *       seconds_pretty = "%02d.%06d" % (seconds, sp)
 * 
 *    if sign < 0:             # <<<<<<<<<<<<<<
 *        sign_pretty = "-"
 *    else:
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_sign, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1298
 * 
 *    if sign < 0:
 *        sign_pretty = "-"             # <<<<<<<<<<<<<<
 *    else:
 *        sign_pretty = ""
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_78));
    __pyx_v_sign_pretty = ((PyObject *)__pyx_kp_s_78);
    goto __pyx_L8;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1300
 *        sign_pretty = "-"
 *    else:
 *        sign_pretty = ""             # <<<<<<<<<<<<<<
 * 
 *    if days or format == 'long':
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
    __pyx_v_sign_pretty = ((PyObject *)__pyx_kp_s_25);
  }
  __pyx_L8:;

  /* "pandas/tslib.pyx":1302
 *        sign_pretty = ""
 * 
 *    if days or format == 'long':             # <<<<<<<<<<<<<<
 *        if (hours or minutes or seconds or frac) or format != 'short':
 *           return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes,
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_days); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_5) {
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_format, ((PyObject *)__pyx_n_s__long), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_5;
  }
  if (__pyx_t_7) {

    /* "pandas/tslib.pyx":1303
 * 
 *    if days or format == 'long':
 *        if (hours or minutes or seconds or frac) or format != 'short':             # <<<<<<<<<<<<<<
 *           return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes,
 *                                            seconds_pretty)
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_hours); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_minutes); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_5) {
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_seconds); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_6) {
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_frac); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_9 = __pyx_t_8;
        } else {
          __pyx_t_9 = __pyx_t_6;
        }
        __pyx_t_6 = __pyx_t_9;
      } else {
        __pyx_t_6 = __pyx_t_5;
      }
      __pyx_t_5 = __pyx_t_6;
    } else {
      __pyx_t_5 = __pyx_t_7;
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_format, ((PyObject *)__pyx_n_s__short), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":1304
 *    if days or format == 'long':
 *        if (hours or minutes or seconds or frac) or format != 'short':
 *           return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes,             # <<<<<<<<<<<<<<
 *                                            seconds_pretty)
 *        else:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "pandas/tslib.pyx":1305
 *        if (hours or minutes or seconds or frac) or format != 'short':
 *           return "%s%d days, %02d:%02d:%s" % (sign_pretty, days, hours, minutes,
 *                                            seconds_pretty)             # <<<<<<<<<<<<<<
 *        else:
 *           return "%s%d days" % (sign_pretty, days)
 */
      __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_sign_pretty);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sign_pretty);
      __Pyx_GIVEREF(__pyx_v_sign_pretty);
      __Pyx_INCREF(__pyx_v_days);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_days);
      __Pyx_GIVEREF(__pyx_v_days);
      __Pyx_INCREF(__pyx_v_hours);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_hours);
      __Pyx_GIVEREF(__pyx_v_hours);
      __Pyx_INCREF(__pyx_v_minutes);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_minutes);
      __Pyx_GIVEREF(__pyx_v_minutes);
      __Pyx_INCREF(__pyx_v_seconds_pretty);
      PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_seconds_pretty);
      __Pyx_GIVEREF(__pyx_v_seconds_pretty);
      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_79), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = ((PyObject *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1307
 *                                            seconds_pretty)
 *        else:
 *           return "%s%d days" % (sign_pretty, days)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_sign_pretty);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sign_pretty);
      __Pyx_GIVEREF(__pyx_v_sign_pretty);
      __Pyx_INCREF(__pyx_v_days);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_days);
      __Pyx_GIVEREF(__pyx_v_days);
      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_80), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __pyx_r = ((PyObject *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }
    __pyx_L10:;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "pandas/tslib.pyx":1310
 * 
 * 
 *    return "%s%02d:%02d:%s" % (sign_pretty, hours, minutes, seconds_pretty)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_sign_pretty);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sign_pretty);
  __Pyx_GIVEREF(__pyx_v_sign_pretty);
  __Pyx_INCREF(__pyx_v_hours);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_hours);
  __Pyx_GIVEREF(__pyx_v_hours);
  __Pyx_INCREF(__pyx_v_minutes);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_minutes);
  __Pyx_GIVEREF(__pyx_v_minutes);
  __Pyx_INCREF(__pyx_v_seconds_pretty);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_seconds_pretty);
  __Pyx_GIVEREF(__pyx_v_seconds_pretty);
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_81), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib.repr_timedelta64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ivalue);
  __Pyx_XDECREF(__pyx_v_frac);
  __Pyx_XDECREF(__pyx_v_sign);
  __Pyx_XDECREF(__pyx_v_days);
  __Pyx_XDECREF(__pyx_v_hours);
  __Pyx_XDECREF(__pyx_v_minutes);
  __Pyx_XDECREF(__pyx_v_seconds);
  __Pyx_XDECREF(__pyx_v_seconds_pretty);
  __Pyx_XDECREF(__pyx_v_sp);
  __Pyx_XDECREF(__pyx_v_sign_pretty);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_35array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_35array_strptime = {__Pyx_NAMESTR("array_strptime"), (PyCFunction)__pyx_pw_6pandas_5tslib_35array_strptime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_35array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_coerce = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_strptime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__fmt,&__pyx_n_s__coerce,0};
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_82;
    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__fmt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("array_strptime", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coerce);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_strptime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __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_fmt = values[1];
    __pyx_v_coerce = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_strptime", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.array_strptime", __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[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_34array_strptime(__pyx_self, __pyx_v_values, __pyx_v_fmt, __pyx_v_coerce);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1313
 * 
 * 
 * def array_strptime(ndarray[object] values, object fmt, coerce=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_5tslib_34array_strptime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_fmt, PyObject *__pyx_v_coerce) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  pandas_datetimestruct __pyx_v_dts;
  PyArrayObject *__pyx_v_iresult = 0;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  int __pyx_v_minute;
  int __pyx_v_hour;
  int __pyx_v_second;
  int __pyx_v_fraction;
  int __pyx_v_weekday;
  int __pyx_v_julian;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_locale_time = NULL;
  PyObject *__pyx_v_format_regex = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_bad_directive = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v__parse_code_table = 0;
  int __pyx_v_parse_code;
  PyObject *__pyx_v_found = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_week_of_year = NULL;
  long __pyx_v_week_of_year_start;
  PyObject *__pyx_v_found_dict = NULL;
  PyObject *__pyx_v_group_key = NULL;
  PyObject *__pyx_v_ampm = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_found_zone = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_tz_values = NULL;
  int __pyx_v_week_starts_Mon;
  PyObject *__pyx_v_datetime_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult;
  __Pyx_Buffer __pyx_pybuffer_iresult;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyArrayObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_5numpy_int64_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_t_29;
  int __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  PyObject *(*__pyx_t_32)(PyObject *);
  PyObject *__pyx_t_33 = NULL;
  int __pyx_t_34;
  int __pyx_t_35;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_strptime", 0);
  __pyx_pybuffer_iresult.pybuffer.buf = NULL;
  __pyx_pybuffer_iresult.refcount = 0;
  __pyx_pybuffernd_iresult.data = NULL;
  __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult;
  __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[0]; __pyx_lineno = 1313; __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/tslib.pyx":1315
 * def array_strptime(ndarray[object] values, object fmt, coerce=False):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         pandas_datetimestruct dts
 *         ndarray[int64_t] iresult
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1322
 * 
 *     global _TimeRE_cache, _regex_cache
 *     with _cache_lock:             # <<<<<<<<<<<<<<
 *         if _getlang() != _TimeRE_cache.locale_time.lang:
 *             _TimeRE_cache = TimeRE()
 */
  /*with:*/ {
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___cache_lock); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____exit__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____enter__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /*try:*/ {
      {
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "pandas/tslib.pyx":1323
 *     global _TimeRE_cache, _regex_cache
 *     with _cache_lock:
 *         if _getlang() != _TimeRE_cache.locale_time.lang:             # <<<<<<<<<<<<<<
 *             _TimeRE_cache = TimeRE()
 *             _regex_cache.clear()
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___getlang); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___TimeRE_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__lang); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_9) {

            /* "pandas/tslib.pyx":1324
 *     with _cache_lock:
 *         if _getlang() != _TimeRE_cache.locale_time.lang:
 *             _TimeRE_cache = TimeRE()             # <<<<<<<<<<<<<<
 *             _regex_cache.clear()
 *         if len(_regex_cache) > _CACHE_MAX_SIZE:
 */
            __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__TimeRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (PyObject_SetAttr(__pyx_m, __pyx_n_s___TimeRE_cache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pandas/tslib.pyx":1325
 *         if _getlang() != _TimeRE_cache.locale_time.lang:
 *             _TimeRE_cache = TimeRE()
 *             _regex_cache.clear()             # <<<<<<<<<<<<<<
 *         if len(_regex_cache) > _CACHE_MAX_SIZE:
 *             _regex_cache.clear()
 */
            __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___regex_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__clear); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L15;
          }
          __pyx_L15:;

          /* "pandas/tslib.pyx":1326
 *             _TimeRE_cache = TimeRE()
 *             _regex_cache.clear()
 *         if len(_regex_cache) > _CACHE_MAX_SIZE:             # <<<<<<<<<<<<<<
 *             _regex_cache.clear()
 *         locale_time = _TimeRE_cache.locale_time
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___regex_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___CACHE_MAX_SIZE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_9) {

            /* "pandas/tslib.pyx":1327
 *             _regex_cache.clear()
 *         if len(_regex_cache) > _CACHE_MAX_SIZE:
 *             _regex_cache.clear()             # <<<<<<<<<<<<<<
 *         locale_time = _TimeRE_cache.locale_time
 *         format_regex = _regex_cache.get(fmt)
 */
            __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___regex_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__clear); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L16;
          }
          __pyx_L16:;

          /* "pandas/tslib.pyx":1328
 *         if len(_regex_cache) > _CACHE_MAX_SIZE:
 *             _regex_cache.clear()
 *         locale_time = _TimeRE_cache.locale_time             # <<<<<<<<<<<<<<
 *         format_regex = _regex_cache.get(fmt)
 *         if not format_regex:
 */
          __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___TimeRE_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_locale_time = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "pandas/tslib.pyx":1329
 *             _regex_cache.clear()
 *         locale_time = _TimeRE_cache.locale_time
 *         format_regex = _regex_cache.get(fmt)             # <<<<<<<<<<<<<<
 *         if not format_regex:
 *             try:
 */
          __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___regex_cache); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_fmt);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fmt);
          __Pyx_GIVEREF(__pyx_v_fmt);
          __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
          __pyx_v_format_regex = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "pandas/tslib.pyx":1330
 *         locale_time = _TimeRE_cache.locale_time
 *         format_regex = _regex_cache.get(fmt)
 *         if not format_regex:             # <<<<<<<<<<<<<<
 *             try:
 *                 format_regex = _TimeRE_cache.compile(fmt)
 */
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_format_regex); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __pyx_t_10 = (!__pyx_t_9);
          if (__pyx_t_10) {

            /* "pandas/tslib.pyx":1331
 *         format_regex = _regex_cache.get(fmt)
 *         if not format_regex:
 *             try:             # <<<<<<<<<<<<<<
 *                 format_regex = _TimeRE_cache.compile(fmt)
 *             # KeyError raised when a bad format is found; can be specified as
 */
            {
              __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
              __Pyx_XGOTREF(__pyx_t_11);
              __Pyx_XGOTREF(__pyx_t_12);
              __Pyx_XGOTREF(__pyx_t_13);
              /*try:*/ {

                /* "pandas/tslib.pyx":1332
 *         if not format_regex:
 *             try:
 *                 format_regex = _TimeRE_cache.compile(fmt)             # <<<<<<<<<<<<<<
 *             # KeyError raised when a bad format is found; can be specified as
 *             # \\, in which case it was a stray % but with a space after it
 */
                __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___TimeRE_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__compile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_INCREF(__pyx_v_fmt);
                PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fmt);
                __Pyx_GIVEREF(__pyx_v_fmt);
                __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_v_format_regex);
                __pyx_v_format_regex = __pyx_t_5;
                __pyx_t_5 = 0;
              }
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              goto __pyx_L25_try_end;
              __pyx_L18_error:;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

              /* "pandas/tslib.pyx":1335
 *             # KeyError raised when a bad format is found; can be specified as
 *             # \\, in which case it was a stray % but with a space after it
 *             except KeyError, err:             # <<<<<<<<<<<<<<
 *                 bad_directive = err.args[0]
 *                 if bad_directive == "\\":
 */
              __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
              if (__pyx_t_14) {
                __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_INCREF(__pyx_t_2);
                __pyx_v_err = __pyx_t_2;

                /* "pandas/tslib.pyx":1336
 *             # \\, in which case it was a stray % but with a space after it
 *             except KeyError, err:
 *                 bad_directive = err.args[0]             # <<<<<<<<<<<<<<
 *                 if bad_directive == "\\":
 *                     bad_directive = "%"
 */
                __pyx_t_15 = PyObject_GetAttr(__pyx_v_err, __pyx_n_s__args); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_15);
                __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_16);
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __pyx_v_bad_directive = __pyx_t_16;
                __pyx_t_16 = 0;

                /* "pandas/tslib.pyx":1337
 *             except KeyError, err:
 *                 bad_directive = err.args[0]
 *                 if bad_directive == "\\":             # <<<<<<<<<<<<<<
 *                     bad_directive = "%"
 *                 del err
 */
                __pyx_t_16 = PyObject_RichCompare(__pyx_v_bad_directive, ((PyObject *)__pyx_kp_s_83), Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                if (__pyx_t_10) {

                  /* "pandas/tslib.pyx":1338
 *                 bad_directive = err.args[0]
 *                 if bad_directive == "\\":
 *                     bad_directive = "%"             # <<<<<<<<<<<<<<
 *                 del err
 *                 raise ValueError("'%s' is a bad directive in format '%s'" %
 */
                  __Pyx_INCREF(((PyObject *)__pyx_kp_s_84));
                  __Pyx_DECREF(__pyx_v_bad_directive);
                  __pyx_v_bad_directive = ((PyObject *)__pyx_kp_s_84);
                  goto __pyx_L28;
                }
                __pyx_L28:;

                /* "pandas/tslib.pyx":1339
 *                 if bad_directive == "\\":
 *                     bad_directive = "%"
 *                 del err             # <<<<<<<<<<<<<<
 *                 raise ValueError("'%s' is a bad directive in format '%s'" %
 *                                     (bad_directive, fmt))
 */
                __Pyx_DECREF(__pyx_v_err);
                __pyx_v_err = NULL;

                /* "pandas/tslib.pyx":1341
 *                 del err
 *                 raise ValueError("'%s' is a bad directive in format '%s'" %
 *                                     (bad_directive, fmt))             # <<<<<<<<<<<<<<
 *             # IndexError only occurs when the format string is "%"
 *             except IndexError:
 */
                __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_16);
                __Pyx_INCREF(__pyx_v_bad_directive);
                PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_bad_directive);
                __Pyx_GIVEREF(__pyx_v_bad_directive);
                __Pyx_INCREF(__pyx_v_fmt);
                PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_fmt);
                __Pyx_GIVEREF(__pyx_v_fmt);
                __pyx_t_15 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_85), ((PyObject *)__pyx_t_16)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(((PyObject *)__pyx_t_15));
                __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
                __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_16);
                PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_15));
                __Pyx_GIVEREF(((PyObject *)__pyx_t_15));
                __pyx_t_15 = 0;
                __pyx_t_15 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
                __Pyx_Raise(__pyx_t_15, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __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;
                goto __pyx_L19_exception_handled;
              }

              /* "pandas/tslib.pyx":1343
 *                                     (bad_directive, fmt))
 *             # IndexError only occurs when the format string is "%"
 *             except IndexError:             # <<<<<<<<<<<<<<
 *                 raise ValueError("stray %% in format '%s'" % fmt)
 *             _regex_cache[fmt] = format_regex
 */
              __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
              if (__pyx_t_14) {
                __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_GOTREF(__pyx_t_5);

                /* "pandas/tslib.pyx":1344
 *             # IndexError only occurs when the format string is "%"
 *             except IndexError:
 *                 raise ValueError("stray %% in format '%s'" % fmt)             # <<<<<<<<<<<<<<
 *             _regex_cache[fmt] = format_regex
 * 
 */
                __pyx_t_15 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_86), __pyx_v_fmt); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(((PyObject *)__pyx_t_15));
                __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_16);
                PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_15));
                __Pyx_GIVEREF(((PyObject *)__pyx_t_15));
                __pyx_t_15 = 0;
                __pyx_t_15 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
                __Pyx_Raise(__pyx_t_15, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                goto __pyx_L19_exception_handled;
              }
              __pyx_L20_except_error:;
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
              goto __pyx_L7_error;
              __pyx_L19_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_11);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_XGIVEREF(__pyx_t_13);
              __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
              __pyx_L25_try_end:;
            }

            /* "pandas/tslib.pyx":1345
 *             except IndexError:
 *                 raise ValueError("stray %% in format '%s'" % fmt)
 *             _regex_cache[fmt] = format_regex             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 */
            __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___regex_cache); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_5);
            if (PyObject_SetItem(__pyx_t_5, __pyx_v_fmt, __pyx_v_format_regex) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L17;
          }
          __pyx_L17:;
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L14_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pandas/tslib.pyx":1322
 * 
 *     global _TimeRE_cache, _regex_cache
 *     with _cache_lock:             # <<<<<<<<<<<<<<
 *         if _getlang() != _TimeRE_cache.locale_time.lang:
 *             _TimeRE_cache = TimeRE()
 */
        /*except:*/ {
          __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_13 = PyObject_Call(__pyx_t_3, __pyx_t_15, NULL);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __pyx_t_9 = (!__pyx_t_10);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_ErrRestore(__pyx_t_5, __pyx_t_2, __pyx_t_4);
            __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; 
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
            goto __pyx_L33;
          }
          __pyx_L33:;
          __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
          __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;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L14_try_end:;
      }
    }
    /*finally:*/ {
      if (__pyx_t_3) {
        __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_k_tuple_87, NULL);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
    }
    goto __pyx_L34;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L1_error;
    __pyx_L34:;
  }

  /* "pandas/tslib.pyx":1347
 *             _regex_cache[fmt] = format_regex
 * 
 *     result = np.empty(n, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *     iresult = result.view('i8')
 * 
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __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 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_15 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_result = __pyx_t_15;
  __pyx_t_15 = 0;

  /* "pandas/tslib.pyx":1348
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 *     dts.us = dts.ps = dts.as = 0
 */
  __pyx_t_15 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__view); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_4 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_17 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__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_3, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_17 = 0;
  __pyx_v_iresult = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1350
 *     iresult = result.view('i8')
 * 
 *     dts.us = dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef dict _parse_code_table = {
 */
  __pyx_v_dts.us = 0;
  __pyx_v_dts.ps = 0;
  __pyx_v_dts.as = 0;

  /* "pandas/tslib.pyx":1352
 *     dts.us = dts.ps = dts.as = 0
 * 
 *     cdef dict _parse_code_table = {             # <<<<<<<<<<<<<<
 *         'y': 0,
 *         'Y': 1,
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__y), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__Y), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__m), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__B), __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__b), __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__d), __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__H), __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__I), __pyx_int_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__M), __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__S), __pyx_int_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__f), __pyx_int_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__A), __pyx_int_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__a), __pyx_int_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__w), __pyx_int_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__j), __pyx_int_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__U), __pyx_int_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__W), __pyx_int_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__Z), __pyx_int_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__p), __pyx_int_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__parse_code_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1375
 *     cdef int parse_code
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         if util.is_string_object(val):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_1; __pyx_t_18+=1) {
    __pyx_v_i = __pyx_t_18;

    /* "pandas/tslib.pyx":1376
 * 
 *     for i in range(n):
 *         val = values[i]             # <<<<<<<<<<<<<<
 *         if util.is_string_object(val):
 *             if val in _nat_strings:
 */
    __pyx_t_19 = __pyx_v_i;
    __pyx_t_14 = -1;
    if (__pyx_t_19 < 0) {
      __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0;
    } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0;
    if (unlikely(__pyx_t_14 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_14);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":1377
 *     for i in range(n):
 *         val = values[i]
 *         if util.is_string_object(val):             # <<<<<<<<<<<<<<
 *             if val in _nat_strings:
 *                 iresult[i] = iNaT
 */
    __pyx_t_14 = is_string_object(__pyx_v_val);
    if (__pyx_t_14) {

      /* "pandas/tslib.pyx":1378
 *         val = values[i]
 *         if util.is_string_object(val):
 *             if val in _nat_strings:             # <<<<<<<<<<<<<<
 *                 iresult[i] = iNaT
 *                 continue
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___nat_strings); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_9) {

        /* "pandas/tslib.pyx":1379
 *         if util.is_string_object(val):
 *             if val in _nat_strings:
 *                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 continue
 *         else:
 */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_14 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_21 += __pyx_pybuffernd_iresult.diminfo[0].shape;
          if (unlikely(__pyx_t_21 < 0)) __pyx_t_14 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0;
        if (unlikely(__pyx_t_14 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_14);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20;

        /* "pandas/tslib.pyx":1380
 *             if val in _nat_strings:
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *         else:
 *             if _checknull_with_nat(val):
 */
        goto __pyx_L35_continue;
        goto __pyx_L38;
      }
      __pyx_L38:;
      goto __pyx_L37;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1382
 *                 continue
 *         else:
 *             if _checknull_with_nat(val):             # <<<<<<<<<<<<<<
 *                 iresult[i] = iNaT
 *                 continue
 */
      __pyx_t_9 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val);
      if (__pyx_t_9) {

        /* "pandas/tslib.pyx":1383
 *         else:
 *             if _checknull_with_nat(val):
 *                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 continue
 *             else:
 */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_22 = __pyx_v_i;
        __pyx_t_14 = -1;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_pybuffernd_iresult.diminfo[0].shape;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_14 = 0;
        } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0;
        if (unlikely(__pyx_t_14 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_14);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20;

        /* "pandas/tslib.pyx":1384
 *             if _checknull_with_nat(val):
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *             else:
 *                 val = str(val)
 */
        goto __pyx_L35_continue;
        goto __pyx_L39;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":1386
 *                 continue
 *             else:
 *                 val = str(val)             # <<<<<<<<<<<<<<
 * 
 *         found = format_regex.match(val)
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_15;
        __pyx_t_15 = 0;
      }
      __pyx_L39:;
    }
    __pyx_L37:;

    /* "pandas/tslib.pyx":1388
 *                 val = str(val)
 * 
 *         found = format_regex.match(val)             # <<<<<<<<<<<<<<
 *         if not found:
 *             if coerce:
 */
    if (unlikely(!__pyx_v_format_regex)) { __Pyx_RaiseUnboundLocalError("format_regex"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_15 = PyObject_GetAttr(__pyx_v_format_regex, __pyx_n_s__match); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_5 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_v_found);
    __pyx_v_found = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/tslib.pyx":1389
 * 
 *         found = format_regex.match(val)
 *         if not found:             # <<<<<<<<<<<<<<
 *             if coerce:
 *                 iresult[i] = iNaT
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_found); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = (!__pyx_t_9);
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1390
 *         found = format_regex.match(val)
 *         if not found:
 *             if coerce:             # <<<<<<<<<<<<<<
 *                 iresult[i] = iNaT
 *                 continue
 */
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_10) {

        /* "pandas/tslib.pyx":1391
 *         if not found:
 *             if coerce:
 *                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 continue
 *             raise ValueError("time data %r does not match format %r" %
 */
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_14 = -1;
        if (__pyx_t_23 < 0) {
          __pyx_t_23 += __pyx_pybuffernd_iresult.diminfo[0].shape;
          if (unlikely(__pyx_t_23 < 0)) __pyx_t_14 = 0;
        } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0;
        if (unlikely(__pyx_t_14 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_14);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20;

        /* "pandas/tslib.pyx":1392
 *             if coerce:
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *             raise ValueError("time data %r does not match format %r" %
 *                              (values[i], fmt))
 */
        goto __pyx_L35_continue;
        goto __pyx_L41;
      }
      __pyx_L41:;

      /* "pandas/tslib.pyx":1394
 *                 continue
 *             raise ValueError("time data %r does not match format %r" %
 *                              (values[i], fmt))             # <<<<<<<<<<<<<<
 *         if len(val) != found.end():
 *             if coerce:
 */
      __pyx_t_24 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_24 < 0) {
        __pyx_t_24 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_24 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __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_INCREF(__pyx_v_fmt);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_fmt);
      __Pyx_GIVEREF(__pyx_v_fmt);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_89), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L40;
    }
    __pyx_L40:;

    /* "pandas/tslib.pyx":1395
 *             raise ValueError("time data %r does not match format %r" %
 *                              (values[i], fmt))
 *         if len(val) != found.end():             # <<<<<<<<<<<<<<
 *             if coerce:
 *                 iresult[i] = iNaT
 */
    __pyx_t_25 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_25); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_found, __pyx_n_s__end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1396
 *                              (values[i], fmt))
 *         if len(val) != found.end():
 *             if coerce:             # <<<<<<<<<<<<<<
 *                 iresult[i] = iNaT
 *                 continue
 */
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_10) {

        /* "pandas/tslib.pyx":1397
 *         if len(val) != found.end():
 *             if coerce:
 *                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 continue
 *             raise ValueError("unconverted data remains: %s" %
 */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_14 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_iresult.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_14 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0;
        if (unlikely(__pyx_t_14 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_14);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20;

        /* "pandas/tslib.pyx":1398
 *             if coerce:
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *             raise ValueError("unconverted data remains: %s" %
 *                               values[i][found.end():])
 */
        goto __pyx_L35_continue;
        goto __pyx_L43;
      }
      __pyx_L43:;

      /* "pandas/tslib.pyx":1400
 *                 continue
 *             raise ValueError("unconverted data remains: %s" %
 *                               values[i][found.end():])             # <<<<<<<<<<<<<<
 *         year = 1900
 *         month = day = 1
 */
      __pyx_t_26 = __pyx_v_i;
      __pyx_t_14 = -1;
      if (__pyx_t_26 < 0) {
        __pyx_t_26 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_26 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_15 = PyObject_GetAttr(__pyx_v_found, __pyx_n_s__end); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_5 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_27 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_27 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_t_4, __pyx_t_27, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_90), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
      __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L42;
    }
    __pyx_L42:;

    /* "pandas/tslib.pyx":1401
 *             raise ValueError("unconverted data remains: %s" %
 *                               values[i][found.end():])
 *         year = 1900             # <<<<<<<<<<<<<<
 *         month = day = 1
 *         hour = minute = second = fraction = 0
 */
    __pyx_v_year = 1900;

    /* "pandas/tslib.pyx":1402
 *                               values[i][found.end():])
 *         year = 1900
 *         month = day = 1             # <<<<<<<<<<<<<<
 *         hour = minute = second = fraction = 0
 *         tz = -1
 */
    __pyx_v_month = 1;
    __pyx_v_day = 1;

    /* "pandas/tslib.pyx":1403
 *         year = 1900
 *         month = day = 1
 *         hour = minute = second = fraction = 0             # <<<<<<<<<<<<<<
 *         tz = -1
 *         # Default to -1 to signify that values not known; not critical to have,
 */
    __pyx_v_hour = 0;
    __pyx_v_minute = 0;
    __pyx_v_second = 0;
    __pyx_v_fraction = 0;

    /* "pandas/tslib.pyx":1404
 *         month = day = 1
 *         hour = minute = second = fraction = 0
 *         tz = -1             # <<<<<<<<<<<<<<
 *         # Default to -1 to signify that values not known; not critical to have,
 *         # though
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __Pyx_XDECREF(__pyx_v_tz);
    __pyx_v_tz = __pyx_int_neg_1;

    /* "pandas/tslib.pyx":1407
 *         # Default to -1 to signify that values not known; not critical to have,
 *         # though
 *         week_of_year = -1             # <<<<<<<<<<<<<<
 *         week_of_year_start = -1
 *         # weekday and julian defaulted to -1 so as to signal need to calculate
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __Pyx_XDECREF(__pyx_v_week_of_year);
    __pyx_v_week_of_year = __pyx_int_neg_1;

    /* "pandas/tslib.pyx":1408
 *         # though
 *         week_of_year = -1
 *         week_of_year_start = -1             # <<<<<<<<<<<<<<
 *         # weekday and julian defaulted to -1 so as to signal need to calculate
 *         # values
 */
    __pyx_v_week_of_year_start = -1;

    /* "pandas/tslib.pyx":1411
 *         # weekday and julian defaulted to -1 so as to signal need to calculate
 *         # values
 *         weekday = julian = -1             # <<<<<<<<<<<<<<
 *         found_dict = found.groupdict()
 *         for group_key in found_dict.iterkeys():
 */
    __pyx_v_weekday = -1;
    __pyx_v_julian = -1;

    /* "pandas/tslib.pyx":1412
 *         # values
 *         weekday = julian = -1
 *         found_dict = found.groupdict()             # <<<<<<<<<<<<<<
 *         for group_key in found_dict.iterkeys():
 *             # Directives not explicitly handled below:
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_found, __pyx_n_s__groupdict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_v_found_dict);
    __pyx_v_found_dict = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/tslib.pyx":1413
 *         weekday = julian = -1
 *         found_dict = found.groupdict()
 *         for group_key in found_dict.iterkeys():             # <<<<<<<<<<<<<<
 *             # Directives not explicitly handled below:
 *             #   c, x, X
 */
    __pyx_t_27 = 0;
    if (unlikely(__pyx_v_found_dict == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iterkeys");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_found_dict, 0, ((PyObject *)__pyx_n_s__iterkeys), (&__pyx_t_28), (&__pyx_t_14)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5);
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
    while (1) {
      __pyx_t_29 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_28, &__pyx_t_27, &__pyx_t_4, NULL, NULL, __pyx_t_14);
      if (unlikely(__pyx_t_29 == 0)) break;
      if (unlikely(__pyx_t_29 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_v_group_key);
      __pyx_v_group_key = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":1419
 *             #   U, W
 *             #      worthless without day of the week
 *             parse_code = _parse_code_table[group_key]             # <<<<<<<<<<<<<<
 * 
 *             if parse_code == 0:
 */
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v__parse_code_table), __pyx_v_group_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_parse_code = __pyx_t_29;

      /* "pandas/tslib.pyx":1491
 *                     # W starts week on Monday.
 *                     week_of_year_start = 0
 *             elif parse_code == 17:             # <<<<<<<<<<<<<<
 *                 # Since -1 is default value only need to worry about setting tz
 *                 # if it can be something other than -1.
 */
      switch (__pyx_v_parse_code) {

        /* "pandas/tslib.pyx":1421
 *             parse_code = _parse_code_table[group_key]
 * 
 *             if parse_code == 0:             # <<<<<<<<<<<<<<
 *                 year = int(found_dict['y'])
 *                 # Open Group specification for strptime() states that a %y
 */
        case 0:

        /* "pandas/tslib.pyx":1422
 * 
 *             if parse_code == 0:
 *                 year = int(found_dict['y'])             # <<<<<<<<<<<<<<
 *                 # Open Group specification for strptime() states that a %y
 *                 #value in the range of [00, 68] is in the century 2000, while
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__y)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_year = __pyx_t_29;

        /* "pandas/tslib.pyx":1426
 *                 #value in the range of [00, 68] is in the century 2000, while
 *                 #[69,99] is in the century 1900
 *                 if year <= 68:             # <<<<<<<<<<<<<<
 *                     year += 2000
 *                 else:
 */
        __pyx_t_10 = (__pyx_v_year <= 68);
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1427
 *                 #[69,99] is in the century 1900
 *                 if year <= 68:
 *                     year += 2000             # <<<<<<<<<<<<<<
 *                 else:
 *                     year += 1900
 */
          __pyx_v_year = (__pyx_v_year + 2000);
          goto __pyx_L46;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1429
 *                     year += 2000
 *                 else:
 *                     year += 1900             # <<<<<<<<<<<<<<
 *             elif parse_code == 1:
 *                 year = int(found_dict['Y'])
 */
          __pyx_v_year = (__pyx_v_year + 1900);
        }
        __pyx_L46:;
        break;

        /* "pandas/tslib.pyx":1430
 *                 else:
 *                     year += 1900
 *             elif parse_code == 1:             # <<<<<<<<<<<<<<
 *                 year = int(found_dict['Y'])
 *             elif parse_code == 2:
 */
        case 1:

        /* "pandas/tslib.pyx":1431
 *                     year += 1900
 *             elif parse_code == 1:
 *                 year = int(found_dict['Y'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 2:
 *                 month = int(found_dict['m'])
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__Y)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_year = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1432
 *             elif parse_code == 1:
 *                 year = int(found_dict['Y'])
 *             elif parse_code == 2:             # <<<<<<<<<<<<<<
 *                 month = int(found_dict['m'])
 *             elif parse_code == 3:
 */
        case 2:

        /* "pandas/tslib.pyx":1433
 *                 year = int(found_dict['Y'])
 *             elif parse_code == 2:
 *                 month = int(found_dict['m'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 3:
 *             # elif group_key == 'B':
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__m)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_month = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1434
 *             elif parse_code == 2:
 *                 month = int(found_dict['m'])
 *             elif parse_code == 3:             # <<<<<<<<<<<<<<
 *             # elif group_key == 'B':
 *                 month = locale_time.f_month.index(found_dict['B'].lower())
 */
        case 3:

        /* "pandas/tslib.pyx":1436
 *             elif parse_code == 3:
 *             # elif group_key == 'B':
 *                 month = locale_time.f_month.index(found_dict['B'].lower())             # <<<<<<<<<<<<<<
 *             elif parse_code == 4:
 *             # elif group_key == 'b':
 */
        if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__f_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__index); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__B)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __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_15, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_month = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1437
 *             # elif group_key == 'B':
 *                 month = locale_time.f_month.index(found_dict['B'].lower())
 *             elif parse_code == 4:             # <<<<<<<<<<<<<<
 *             # elif group_key == 'b':
 *                 month = locale_time.a_month.index(found_dict['b'].lower())
 */
        case 4:

        /* "pandas/tslib.pyx":1439
 *             elif parse_code == 4:
 *             # elif group_key == 'b':
 *                 month = locale_time.a_month.index(found_dict['b'].lower())             # <<<<<<<<<<<<<<
 *             elif parse_code == 5:
 *             # elif group_key == 'd':
 */
        if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__b)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_month = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1440
 *             # elif group_key == 'b':
 *                 month = locale_time.a_month.index(found_dict['b'].lower())
 *             elif parse_code == 5:             # <<<<<<<<<<<<<<
 *             # elif group_key == 'd':
 *                 day = int(found_dict['d'])
 */
        case 5:

        /* "pandas/tslib.pyx":1442
 *             elif parse_code == 5:
 *             # elif group_key == 'd':
 *                 day = int(found_dict['d'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 6:
 *             # elif group_key == 'H':
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__d)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_day = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1443
 *             # elif group_key == 'd':
 *                 day = int(found_dict['d'])
 *             elif parse_code == 6:             # <<<<<<<<<<<<<<
 *             # elif group_key == 'H':
 *                 hour = int(found_dict['H'])
 */
        case 6:

        /* "pandas/tslib.pyx":1445
 *             elif parse_code == 6:
 *             # elif group_key == 'H':
 *                 hour = int(found_dict['H'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 7:
 *                 hour = int(found_dict['I'])
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__H)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_hour = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1446
 *             # elif group_key == 'H':
 *                 hour = int(found_dict['H'])
 *             elif parse_code == 7:             # <<<<<<<<<<<<<<
 *                 hour = int(found_dict['I'])
 *                 ampm = found_dict.get('p', '').lower()
 */
        case 7:

        /* "pandas/tslib.pyx":1447
 *                 hour = int(found_dict['H'])
 *             elif parse_code == 7:
 *                 hour = int(found_dict['I'])             # <<<<<<<<<<<<<<
 *                 ampm = found_dict.get('p', '').lower()
 *                 # If there was no AM/PM indicator, we'll treat this like AM
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__I)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_hour = __pyx_t_29;

        /* "pandas/tslib.pyx":1448
 *             elif parse_code == 7:
 *                 hour = int(found_dict['I'])
 *                 ampm = found_dict.get('p', '').lower()             # <<<<<<<<<<<<<<
 *                 # If there was no AM/PM indicator, we'll treat this like AM
 *                 if ampm in ('', locale_time.am_pm[0]):
 */
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_found_dict, __pyx_n_s__get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_v_ampm);
        __pyx_v_ampm = __pyx_t_15;
        __pyx_t_15 = 0;

        /* "pandas/tslib.pyx":1450
 *                 ampm = found_dict.get('p', '').lower()
 *                 # If there was no AM/PM indicator, we'll treat this like AM
 *                 if ampm in ('', locale_time.am_pm[0]):             # <<<<<<<<<<<<<<
 *                     # We're in AM so the hour is correct unless we're
 *                     # looking at 12 midnight.
 */
        if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_15 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_15, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_v_ampm);
        __pyx_t_15 = __pyx_v_ampm;
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_15, ((PyObject *)__pyx_kp_s_25), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!((int)__pyx_t_10)) {
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_15, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_30 = ((int)__pyx_t_9);
        } else {
          __pyx_t_30 = ((int)__pyx_t_10);
        }
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_10 = __pyx_t_30;
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1454
 *                     # looking at 12 midnight.
 *                     # 12 midnight == 12 AM == hour 0
 *                     if hour == 12:             # <<<<<<<<<<<<<<
 *                         hour = 0
 *                 elif ampm == locale_time.am_pm[1]:
 */
          __pyx_t_10 = (__pyx_v_hour == 12);
          if (__pyx_t_10) {

            /* "pandas/tslib.pyx":1455
 *                     # 12 midnight == 12 AM == hour 0
 *                     if hour == 12:
 *                         hour = 0             # <<<<<<<<<<<<<<
 *                 elif ampm == locale_time.am_pm[1]:
 *                     # We're in PM so we need to add 12 to the hour unless
 */
            __pyx_v_hour = 0;
            goto __pyx_L48;
          }
          __pyx_L48:;
          goto __pyx_L47;
        }

        /* "pandas/tslib.pyx":1456
 *                     if hour == 12:
 *                         hour = 0
 *                 elif ampm == locale_time.am_pm[1]:             # <<<<<<<<<<<<<<
 *                     # We're in PM so we need to add 12 to the hour unless
 *                     # we're looking at 12 noon.
 */
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_ampm, __pyx_t_15, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1460
 *                     # we're looking at 12 noon.
 *                     # 12 noon == 12 PM == hour 12
 *                     if hour != 12:             # <<<<<<<<<<<<<<
 *                         hour += 12
 *             elif parse_code == 8:
 */
          __pyx_t_10 = (__pyx_v_hour != 12);
          if (__pyx_t_10) {

            /* "pandas/tslib.pyx":1461
 *                     # 12 noon == 12 PM == hour 12
 *                     if hour != 12:
 *                         hour += 12             # <<<<<<<<<<<<<<
 *             elif parse_code == 8:
 *                 minute = int(found_dict['M'])
 */
            __pyx_v_hour = (__pyx_v_hour + 12);
            goto __pyx_L49;
          }
          __pyx_L49:;
          goto __pyx_L47;
        }
        __pyx_L47:;
        break;

        /* "pandas/tslib.pyx":1462
 *                     if hour != 12:
 *                         hour += 12
 *             elif parse_code == 8:             # <<<<<<<<<<<<<<
 *                 minute = int(found_dict['M'])
 *             elif parse_code == 9:
 */
        case 8:

        /* "pandas/tslib.pyx":1463
 *                         hour += 12
 *             elif parse_code == 8:
 *                 minute = int(found_dict['M'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 9:
 *                 second = int(found_dict['S'])
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__M)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_minute = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1464
 *             elif parse_code == 8:
 *                 minute = int(found_dict['M'])
 *             elif parse_code == 9:             # <<<<<<<<<<<<<<
 *                 second = int(found_dict['S'])
 *             elif parse_code == 10:
 */
        case 9:

        /* "pandas/tslib.pyx":1465
 *                 minute = int(found_dict['M'])
 *             elif parse_code == 9:
 *                 second = int(found_dict['S'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 10:
 *                 s = found_dict['f']
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__S)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_second = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1466
 *             elif parse_code == 9:
 *                 second = int(found_dict['S'])
 *             elif parse_code == 10:             # <<<<<<<<<<<<<<
 *                 s = found_dict['f']
 *                 # Pad to always return microseconds.
 */
        case 10:

        /* "pandas/tslib.pyx":1467
 *                 second = int(found_dict['S'])
 *             elif parse_code == 10:
 *                 s = found_dict['f']             # <<<<<<<<<<<<<<
 *                 # Pad to always return microseconds.
 *                 s += "0" * (6 - len(s))
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__f)); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF(__pyx_v_s);
        __pyx_v_s = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pandas/tslib.pyx":1469
 *                 s = found_dict['f']
 *                 # Pad to always return microseconds.
 *                 s += "0" * (6 - len(s))             # <<<<<<<<<<<<<<
 *                 fraction = int(s)
 *             elif parse_code == 11:
 */
        __pyx_t_31 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_31 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = PyInt_FromSsize_t((6 - __pyx_t_31)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyNumber_Multiply(((PyObject *)__pyx_kp_s__0), __pyx_t_4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_15));
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_s, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_v_s);
        __pyx_v_s = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "pandas/tslib.pyx":1470
 *                 # Pad to always return microseconds.
 *                 s += "0" * (6 - len(s))
 *                 fraction = int(s)             # <<<<<<<<<<<<<<
 *             elif parse_code == 11:
 *                 weekday = locale_time.f_weekday.index(found_dict['A'].lower())
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_s);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_s);
        __Pyx_GIVEREF(__pyx_v_s);
        __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_15); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_v_fraction = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1471
 *                 s += "0" * (6 - len(s))
 *                 fraction = int(s)
 *             elif parse_code == 11:             # <<<<<<<<<<<<<<
 *                 weekday = locale_time.f_weekday.index(found_dict['A'].lower())
 *             elif parse_code == 12:
 */
        case 11:

        /* "pandas/tslib.pyx":1472
 *                 fraction = int(s)
 *             elif parse_code == 11:
 *                 weekday = locale_time.f_weekday.index(found_dict['A'].lower())             # <<<<<<<<<<<<<<
 *             elif parse_code == 12:
 *                 weekday = locale_time.a_weekday.index(found_dict['a'].lower())
 */
        if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_15 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__f_weekday); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__A)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_15); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_v_weekday = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1473
 *             elif parse_code == 11:
 *                 weekday = locale_time.f_weekday.index(found_dict['A'].lower())
 *             elif parse_code == 12:             # <<<<<<<<<<<<<<
 *                 weekday = locale_time.a_weekday.index(found_dict['a'].lower())
 *             elif parse_code == 13:
 */
        case 12:

        /* "pandas/tslib.pyx":1474
 *                 weekday = locale_time.f_weekday.index(found_dict['A'].lower())
 *             elif parse_code == 12:
 *                 weekday = locale_time.a_weekday.index(found_dict['a'].lower())             # <<<<<<<<<<<<<<
 *             elif parse_code == 13:
 *                 weekday = int(found_dict['w'])
 */
        if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_15 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__a_weekday); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__a)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_15); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_v_weekday = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1475
 *             elif parse_code == 12:
 *                 weekday = locale_time.a_weekday.index(found_dict['a'].lower())
 *             elif parse_code == 13:             # <<<<<<<<<<<<<<
 *                 weekday = int(found_dict['w'])
 *                 if weekday == 0:
 */
        case 13:

        /* "pandas/tslib.pyx":1476
 *                 weekday = locale_time.a_weekday.index(found_dict['a'].lower())
 *             elif parse_code == 13:
 *                 weekday = int(found_dict['w'])             # <<<<<<<<<<<<<<
 *                 if weekday == 0:
 *                     weekday = 6
 */
        __pyx_t_15 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__w)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_15); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_v_weekday = __pyx_t_29;

        /* "pandas/tslib.pyx":1477
 *             elif parse_code == 13:
 *                 weekday = int(found_dict['w'])
 *                 if weekday == 0:             # <<<<<<<<<<<<<<
 *                     weekday = 6
 *                 else:
 */
        __pyx_t_10 = (__pyx_v_weekday == 0);
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1478
 *                 weekday = int(found_dict['w'])
 *                 if weekday == 0:
 *                     weekday = 6             # <<<<<<<<<<<<<<
 *                 else:
 *                     weekday -= 1
 */
          __pyx_v_weekday = 6;
          goto __pyx_L50;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1480
 *                     weekday = 6
 *                 else:
 *                     weekday -= 1             # <<<<<<<<<<<<<<
 *             elif parse_code == 14:
 *                 julian = int(found_dict['j'])
 */
          __pyx_v_weekday = (__pyx_v_weekday - 1);
        }
        __pyx_L50:;
        break;

        /* "pandas/tslib.pyx":1481
 *                 else:
 *                     weekday -= 1
 *             elif parse_code == 14:             # <<<<<<<<<<<<<<
 *                 julian = int(found_dict['j'])
 *             elif parse_code == 15 or parse_code == 16:
 */
        case 14:

        /* "pandas/tslib.pyx":1482
 *                     weekday -= 1
 *             elif parse_code == 14:
 *                 julian = int(found_dict['j'])             # <<<<<<<<<<<<<<
 *             elif parse_code == 15 or parse_code == 16:
 *                 week_of_year = int(found_dict[group_key])
 */
        __pyx_t_15 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__j)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __pyx_t_29 = __Pyx_PyInt_AsInt(__pyx_t_15); if (unlikely((__pyx_t_29 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_v_julian = __pyx_t_29;
        break;

        /* "pandas/tslib.pyx":1483
 *             elif parse_code == 14:
 *                 julian = int(found_dict['j'])
 *             elif parse_code == 15 or parse_code == 16:             # <<<<<<<<<<<<<<
 *                 week_of_year = int(found_dict[group_key])
 *                 if group_key == 'U':
 */
        case 15:
        case 16:

        /* "pandas/tslib.pyx":1484
 *                 julian = int(found_dict['j'])
 *             elif parse_code == 15 or parse_code == 16:
 *                 week_of_year = int(found_dict[group_key])             # <<<<<<<<<<<<<<
 *                 if group_key == 'U':
 *                     # U starts week on Sunday.
 */
        __pyx_t_15 = PyObject_GetItem(__pyx_v_found_dict, __pyx_v_group_key); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_v_week_of_year);
        __pyx_v_week_of_year = __pyx_t_15;
        __pyx_t_15 = 0;

        /* "pandas/tslib.pyx":1485
 *             elif parse_code == 15 or parse_code == 16:
 *                 week_of_year = int(found_dict[group_key])
 *                 if group_key == 'U':             # <<<<<<<<<<<<<<
 *                     # U starts week on Sunday.
 *                     week_of_year_start = 6
 */
        __pyx_t_15 = PyObject_RichCompare(__pyx_v_group_key, ((PyObject *)__pyx_n_s__U), Py_EQ); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1487
 *                 if group_key == 'U':
 *                     # U starts week on Sunday.
 *                     week_of_year_start = 6             # <<<<<<<<<<<<<<
 *                 else:
 *                     # W starts week on Monday.
 */
          __pyx_v_week_of_year_start = 6;
          goto __pyx_L51;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1490
 *                 else:
 *                     # W starts week on Monday.
 *                     week_of_year_start = 0             # <<<<<<<<<<<<<<
 *             elif parse_code == 17:
 *                 # Since -1 is default value only need to worry about setting tz
 */
          __pyx_v_week_of_year_start = 0;
        }
        __pyx_L51:;
        break;

        /* "pandas/tslib.pyx":1491
 *                     # W starts week on Monday.
 *                     week_of_year_start = 0
 *             elif parse_code == 17:             # <<<<<<<<<<<<<<
 *                 # Since -1 is default value only need to worry about setting tz
 *                 # if it can be something other than -1.
 */
        case 17:

        /* "pandas/tslib.pyx":1494
 *                 # Since -1 is default value only need to worry about setting tz
 *                 # if it can be something other than -1.
 *                 found_zone = found_dict['Z'].lower()             # <<<<<<<<<<<<<<
 *                 for value, tz_values in enumerate(locale_time.timezone):
 *                     if found_zone in tz_values:
 */
        __pyx_t_15 = PyObject_GetItem(__pyx_v_found_dict, ((PyObject *)__pyx_n_s__Z)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_v_found_zone);
        __pyx_v_found_zone = __pyx_t_15;
        __pyx_t_15 = 0;

        /* "pandas/tslib.pyx":1495
 *                 # if it can be something other than -1.
 *                 found_zone = found_dict['Z'].lower()
 *                 for value, tz_values in enumerate(locale_time.timezone):             # <<<<<<<<<<<<<<
 *                     if found_zone in tz_values:
 *                         # Deal w/ bad locale setup where timezone names are the
 */
        __Pyx_INCREF(__pyx_int_0);
        __pyx_t_15 = __pyx_int_0;
        if (unlikely(!__pyx_v_locale_time)) { __Pyx_RaiseUnboundLocalError("locale_time"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_locale_time, __pyx_n_s__timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
          __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_31 = 0;
          __pyx_t_32 = NULL;
        } else {
          __pyx_t_31 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_32 = Py_TYPE(__pyx_t_2)->tp_iternext;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        for (;;) {
          if (!__pyx_t_32 && PyList_CheckExact(__pyx_t_2)) {
            if (__pyx_t_31 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_31); __Pyx_INCREF(__pyx_t_4); __pyx_t_31++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_31); __pyx_t_31++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else if (!__pyx_t_32 && PyTuple_CheckExact(__pyx_t_2)) {
            if (__pyx_t_31 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_31); __Pyx_INCREF(__pyx_t_4); __pyx_t_31++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_31); __pyx_t_31++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            #endif
          } else {
            __pyx_t_4 = __pyx_t_32(__pyx_t_2);
            if (unlikely(!__pyx_t_4)) {
              if (PyErr_Occurred()) {
                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_XDECREF(__pyx_v_tz_values);
          __pyx_v_tz_values = __pyx_t_4;
          __pyx_t_4 = 0;
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_XDECREF(__pyx_v_value);
          __pyx_v_value = __pyx_t_15;
          __pyx_t_4 = PyNumber_Add(__pyx_t_15, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_15);
          __pyx_t_15 = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "pandas/tslib.pyx":1496
 *                 found_zone = found_dict['Z'].lower()
 *                 for value, tz_values in enumerate(locale_time.timezone):
 *                     if found_zone in tz_values:             # <<<<<<<<<<<<<<
 *                         # Deal w/ bad locale setup where timezone names are the
 *                         # same and yet time.daylight is true; too ambiguous to
 */
          __pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_v_found_zone, __pyx_v_tz_values, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_10) {

            /* "pandas/tslib.pyx":1500
 *                         # same and yet time.daylight is true; too ambiguous to
 *                         # be able to tell what timezone has daylight savings
 *                         if (time.tzname[0] == time.tzname[1] and             # <<<<<<<<<<<<<<
 *                            time.daylight and found_zone not in ("utc", "gmt")):
 *                             break
 */
            __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_16 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__tzname); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_16, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_33 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__tzname); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_33);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_33, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
            __pyx_t_33 = PyObject_RichCompare(__pyx_t_4, __pyx_t_16, Py_EQ); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
            if (__pyx_t_10) {

              /* "pandas/tslib.pyx":1501
 *                         # be able to tell what timezone has daylight savings
 *                         if (time.tzname[0] == time.tzname[1] and
 *                            time.daylight and found_zone not in ("utc", "gmt")):             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_t_33 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_33);
              __pyx_t_16 = PyObject_GetAttr(__pyx_t_33, __pyx_n_s__daylight); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
              __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_30 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (__pyx_t_30) {
                __Pyx_INCREF(__pyx_v_found_zone);
                __pyx_t_16 = __pyx_v_found_zone;
                __pyx_t_33 = PyObject_RichCompare(__pyx_t_16, ((PyObject *)__pyx_n_s__utc), Py_NE); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                if (((int)__pyx_t_9)) {
                  __pyx_t_33 = PyObject_RichCompare(__pyx_t_16, ((PyObject *)__pyx_n_s__gmt), Py_NE); __Pyx_XGOTREF(__pyx_t_33); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                  __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely((__pyx_t_34 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
                  __pyx_t_35 = ((int)__pyx_t_34);
                } else {
                  __pyx_t_35 = ((int)__pyx_t_9);
                }
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                __pyx_t_9 = __pyx_t_35;
                __pyx_t_35 = __pyx_t_9;
              } else {
                __pyx_t_35 = __pyx_t_30;
              }
              __pyx_t_30 = __pyx_t_35;
            } else {
              __pyx_t_30 = __pyx_t_10;
            }
            if (__pyx_t_30) {

              /* "pandas/tslib.pyx":1502
 *                         if (time.tzname[0] == time.tzname[1] and
 *                            time.daylight and found_zone not in ("utc", "gmt")):
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             tz = value
 */
              goto __pyx_L53_break;
              goto __pyx_L55;
            }
            /*else*/ {

              /* "pandas/tslib.pyx":1504
 *                             break
 *                         else:
 *                             tz = value             # <<<<<<<<<<<<<<
 *                             break
 *         # If we know the wk of the year and what day of that wk, we can figure
 */
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_DECREF(__pyx_v_tz);
              __pyx_v_tz = __pyx_v_value;

              /* "pandas/tslib.pyx":1505
 *                         else:
 *                             tz = value
 *                             break             # <<<<<<<<<<<<<<
 *         # If we know the wk of the year and what day of that wk, we can figure
 *         # out the Julian day of the year.
 */
              goto __pyx_L53_break;
            }
            __pyx_L55:;
            goto __pyx_L54;
          }
          __pyx_L54:;
        }
        __pyx_L53_break:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        break;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pandas/tslib.pyx":1508
 *         # If we know the wk of the year and what day of that wk, we can figure
 *         # out the Julian day of the year.
 *         if julian == -1 and week_of_year != -1 and weekday != -1:             # <<<<<<<<<<<<<<
 *             week_starts_Mon = True if week_of_year_start == 0 else False
 *             julian = _calc_julian_from_U_or_W(year, week_of_year, weekday,
 */
    __pyx_t_30 = (__pyx_v_julian == -1);
    if (__pyx_t_30) {
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_week_of_year, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_10) {
        __pyx_t_35 = (__pyx_v_weekday != -1);
        __pyx_t_9 = __pyx_t_35;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      __pyx_t_10 = __pyx_t_9;
    } else {
      __pyx_t_10 = __pyx_t_30;
    }
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1509
 *         # out the Julian day of the year.
 *         if julian == -1 and week_of_year != -1 and weekday != -1:
 *             week_starts_Mon = True if week_of_year_start == 0 else False             # <<<<<<<<<<<<<<
 *             julian = _calc_julian_from_U_or_W(year, week_of_year, weekday,
 *                                                 week_starts_Mon)
 */
      if ((__pyx_v_week_of_year_start == 0)) {
        __pyx_t_10 = 1;
      } else {
        __pyx_t_10 = 0;
      }
      __pyx_v_week_starts_Mon = __pyx_t_10;

      /* "pandas/tslib.pyx":1510
 *         if julian == -1 and week_of_year != -1 and weekday != -1:
 *             week_starts_Mon = True if week_of_year_start == 0 else False
 *             julian = _calc_julian_from_U_or_W(year, week_of_year, weekday,             # <<<<<<<<<<<<<<
 *                                                 week_starts_Mon)
 *         # Cannot pre-calculate datetime_date() since can change in Julian
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_92); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_15 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);

      /* "pandas/tslib.pyx":1511
 *             week_starts_Mon = True if week_of_year_start == 0 else False
 *             julian = _calc_julian_from_U_or_W(year, week_of_year, weekday,
 *                                                 week_starts_Mon)             # <<<<<<<<<<<<<<
 *         # Cannot pre-calculate datetime_date() since can change in Julian
 *         # calculation and thus could have different value for the day of the wk
 */
      __pyx_t_16 = __Pyx_PyBool_FromLong(__pyx_v_week_starts_Mon); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_33 = PyTuple_New(4); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_v_week_of_year);
      PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_v_week_of_year);
      __Pyx_GIVEREF(__pyx_v_week_of_year);
      PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_33, 3, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      __pyx_t_15 = 0;
      __pyx_t_2 = 0;
      __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_33), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_33)); __pyx_t_33 = 0;
      __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_v_julian = __pyx_t_14;
      goto __pyx_L56;
    }
    __pyx_L56:;

    /* "pandas/tslib.pyx":1515
 *         # calculation and thus could have different value for the day of the wk
 *         # calculation.
 *         if julian == -1:             # <<<<<<<<<<<<<<
 *             # Need to add 1 to result since first day of the year is 1, not 0.
 *             julian = datetime_date(year, month, day).toordinal() - \
 */
    __pyx_t_10 = (__pyx_v_julian == -1);
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1517
 *         if julian == -1:
 *             # Need to add 1 to result since first day of the year is 1, not 0.
 *             julian = datetime_date(year, month, day).toordinal() - \             # <<<<<<<<<<<<<<
 *                       datetime_date(year, 1, 1).toordinal() + 1
 *         else:  # Assume that if they bothered to include Julian day it will
 */
      __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_date); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_33 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __pyx_t_5 = PyInt_FromLong(__pyx_v_month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_33);
      __Pyx_GIVEREF(__pyx_t_33);
      PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_33 = 0;
      __pyx_t_5 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "pandas/tslib.pyx":1518
 *             # Need to add 1 to result since first day of the year is 1, not 0.
 *             julian = datetime_date(year, month, day).toordinal() - \
 *                       datetime_date(year, 1, 1).toordinal() + 1             # <<<<<<<<<<<<<<
 *         else:  # Assume that if they bothered to include Julian day it will
 *                # be accurate.
 */
      __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_date); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Subtract(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __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_16); __pyx_t_16 = 0;
      __pyx_t_16 = PyNumber_Add(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_v_julian = __pyx_t_14;
      goto __pyx_L57;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1521
 *         else:  # Assume that if they bothered to include Julian day it will
 *                # be accurate.
 *             datetime_result = datetime_date.fromordinal(             # <<<<<<<<<<<<<<
 *                 (julian - 1) + datetime_date(year, 1, 1).toordinal())
 *             year = datetime_result.year
 */
      __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_date); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__fromordinal); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":1522
 *                # be accurate.
 *             datetime_result = datetime_date.fromordinal(
 *                 (julian - 1) + datetime_date(year, 1, 1).toordinal())             # <<<<<<<<<<<<<<
 *             year = datetime_result.year
 *             month = datetime_result.month
 */
      __pyx_t_16 = PyInt_FromLong((__pyx_v_julian - 1)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_33 = PyTuple_New(3); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_33, 1, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_33, 2, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_33), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_33)); __pyx_t_33 = 0;
      __pyx_t_33 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_Call(__pyx_t_33, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
      __pyx_t_33 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_33);
      __Pyx_GIVEREF(__pyx_t_33);
      __pyx_t_33 = 0;
      __pyx_t_33 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_v_datetime_result);
      __pyx_v_datetime_result = __pyx_t_33;
      __pyx_t_33 = 0;

      /* "pandas/tslib.pyx":1523
 *             datetime_result = datetime_date.fromordinal(
 *                 (julian - 1) + datetime_date(year, 1, 1).toordinal())
 *             year = datetime_result.year             # <<<<<<<<<<<<<<
 *             month = datetime_result.month
 *             day = datetime_result.day
 */
      __pyx_t_33 = PyObject_GetAttr(__pyx_v_datetime_result, __pyx_n_s__year); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
      __pyx_v_year = __pyx_t_14;

      /* "pandas/tslib.pyx":1524
 *                 (julian - 1) + datetime_date(year, 1, 1).toordinal())
 *             year = datetime_result.year
 *             month = datetime_result.month             # <<<<<<<<<<<<<<
 *             day = datetime_result.day
 *         if weekday == -1:
 */
      __pyx_t_33 = PyObject_GetAttr(__pyx_v_datetime_result, __pyx_n_s__month); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
      __pyx_v_month = __pyx_t_14;

      /* "pandas/tslib.pyx":1525
 *             year = datetime_result.year
 *             month = datetime_result.month
 *             day = datetime_result.day             # <<<<<<<<<<<<<<
 *         if weekday == -1:
 *             weekday = datetime_date(year, month, day).weekday()
 */
      __pyx_t_33 = PyObject_GetAttr(__pyx_v_datetime_result, __pyx_n_s__day); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_33); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
      __pyx_v_day = __pyx_t_14;
    }
    __pyx_L57:;

    /* "pandas/tslib.pyx":1526
 *             month = datetime_result.month
 *             day = datetime_result.day
 *         if weekday == -1:             # <<<<<<<<<<<<<<
 *             weekday = datetime_date(year, month, day).weekday()
 * 
 */
    __pyx_t_10 = (__pyx_v_weekday == -1);
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1527
 *             day = datetime_result.day
 *         if weekday == -1:
 *             weekday = datetime_date(year, month, day).weekday()             # <<<<<<<<<<<<<<
 * 
 *         dts.year = year
 */
      __pyx_t_33 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_date); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_33);
      __pyx_t_15 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_5 = PyInt_FromLong(__pyx_v_month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_16 = PyInt_FromLong(__pyx_v_day); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      __pyx_t_15 = 0;
      __pyx_t_5 = 0;
      __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(__pyx_t_33, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_v_weekday = __pyx_t_14;
      goto __pyx_L58;
    }
    __pyx_L58:;

    /* "pandas/tslib.pyx":1529
 *             weekday = datetime_date(year, month, day).weekday()
 * 
 *         dts.year = year             # <<<<<<<<<<<<<<
 *         dts.month = month
 *         dts.day = day
 */
    __pyx_v_dts.year = __pyx_v_year;

    /* "pandas/tslib.pyx":1530
 * 
 *         dts.year = year
 *         dts.month = month             # <<<<<<<<<<<<<<
 *         dts.day = day
 *         dts.hour = hour
 */
    __pyx_v_dts.month = __pyx_v_month;

    /* "pandas/tslib.pyx":1531
 *         dts.year = year
 *         dts.month = month
 *         dts.day = day             # <<<<<<<<<<<<<<
 *         dts.hour = hour
 *         dts.min = minute
 */
    __pyx_v_dts.day = __pyx_v_day;

    /* "pandas/tslib.pyx":1532
 *         dts.month = month
 *         dts.day = day
 *         dts.hour = hour             # <<<<<<<<<<<<<<
 *         dts.min = minute
 *         dts.sec = second
 */
    __pyx_v_dts.hour = __pyx_v_hour;

    /* "pandas/tslib.pyx":1533
 *         dts.day = day
 *         dts.hour = hour
 *         dts.min = minute             # <<<<<<<<<<<<<<
 *         dts.sec = second
 *         dts.us = fraction
 */
    __pyx_v_dts.min = __pyx_v_minute;

    /* "pandas/tslib.pyx":1534
 *         dts.hour = hour
 *         dts.min = minute
 *         dts.sec = second             # <<<<<<<<<<<<<<
 *         dts.us = fraction
 * 
 */
    __pyx_v_dts.sec = __pyx_v_second;

    /* "pandas/tslib.pyx":1535
 *         dts.min = minute
 *         dts.sec = second
 *         dts.us = fraction             # <<<<<<<<<<<<<<
 * 
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 */
    __pyx_v_dts.us = __pyx_v_fraction;

    /* "pandas/tslib.pyx":1537
 *         dts.us = fraction
 * 
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *         try:
 *             _check_dts_bounds(&dts)
 */
    __pyx_t_28 = __pyx_v_i;
    __pyx_t_14 = -1;
    if (__pyx_t_28 < 0) {
      __pyx_t_28 += __pyx_pybuffernd_iresult.diminfo[0].shape;
      if (unlikely(__pyx_t_28 < 0)) __pyx_t_14 = 0;
    } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0;
    if (unlikely(__pyx_t_14 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_14);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":1538
 * 
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 *         try:             # <<<<<<<<<<<<<<
 *             _check_dts_bounds(&dts)
 *         except ValueError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_3);
      /*try:*/ {

        /* "pandas/tslib.pyx":1539
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 *         try:
 *             _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             if coerce:
 */
        __pyx_t_16 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L59_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L66_try_end;
      __pyx_L59_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_33); __pyx_t_33 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":1540
 *         try:
 *             _check_dts_bounds(&dts)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             if coerce:
 *                 iresult[i] = iNaT
 */
      __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_14) {
        __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_2, &__pyx_t_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_33);

        /* "pandas/tslib.pyx":1541
 *             _check_dts_bounds(&dts)
 *         except ValueError:
 *             if coerce:             # <<<<<<<<<<<<<<
 *                 iresult[i] = iNaT
 *                 continue
 */
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1542
 *         except ValueError:
 *             if coerce:
 *                 iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 continue
 *             raise
 */
          __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_14 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_iresult.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_14 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_14 = 0;
          if (unlikely(__pyx_t_14 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_14);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_20;

          /* "pandas/tslib.pyx":1543
 *             if coerce:
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
          goto __pyx_L68_except_continue;
          goto __pyx_L69;
        }
        __pyx_L69:;

        /* "pandas/tslib.pyx":1544
 *                 iresult[i] = iNaT
 *                 continue
 *             raise             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __Pyx_GIVEREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_33);
        __Pyx_ErrRestore(__pyx_t_16, __pyx_t_2, __pyx_t_33);
        __pyx_t_16 = 0; __pyx_t_2 = 0; __pyx_t_33 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
        goto __pyx_L60_exception_handled;
        __pyx_L68_except_continue:;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
        goto __pyx_L65_try_continue;
      }
      __pyx_L61_except_error:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3);
      goto __pyx_L1_error;
      __pyx_L65_try_continue:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3);
      goto __pyx_L35_continue;
      __pyx_L60_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_3);
      __pyx_L66_try_end:;
    }
    __pyx_L35_continue:;
  }

  /* "pandas/tslib.pyx":1546
 *             raise
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_33);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.array_strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_iresult);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_locale_time);
  __Pyx_XDECREF(__pyx_v_format_regex);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_bad_directive);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v__parse_code_table);
  __Pyx_XDECREF(__pyx_v_found);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_week_of_year);
  __Pyx_XDECREF(__pyx_v_found_dict);
  __Pyx_XDECREF(__pyx_v_group_key);
  __Pyx_XDECREF(__pyx_v_ampm);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_found_zone);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_tz_values);
  __Pyx_XDECREF(__pyx_v_datetime_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1549
 * 
 * 
 * cdef inline _get_datetime64_nanos(object val):             # <<<<<<<<<<<<<<
 *     cdef:
 *         pandas_datetimestruct dts
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib__get_datetime64_nanos(PyObject *__pyx_v_val) {
  pandas_datetimestruct __pyx_v_dts;
  PANDAS_DATETIMEUNIT __pyx_v_unit;
  npy_datetime __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_datetime64_nanos", 0);

  /* "pandas/tslib.pyx":1555
 *         npy_datetime ival
 * 
 *     unit = get_datetime64_unit(val)             # <<<<<<<<<<<<<<
 *     if unit == 3:
 *         raise ValueError('NumPy 1.6.1 business freq not supported')
 */
  __pyx_v_unit = get_datetime64_unit(__pyx_v_val);

  /* "pandas/tslib.pyx":1556
 * 
 *     unit = get_datetime64_unit(val)
 *     if unit == 3:             # <<<<<<<<<<<<<<
 *         raise ValueError('NumPy 1.6.1 business freq not supported')
 * 
 */
  __pyx_t_1 = (__pyx_v_unit == 3);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1557
 *     unit = get_datetime64_unit(val)
 *     if unit == 3:
 *         raise ValueError('NumPy 1.6.1 business freq not supported')             # <<<<<<<<<<<<<<
 * 
 *     ival = get_datetime64_value(val)
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1559
 *         raise ValueError('NumPy 1.6.1 business freq not supported')
 * 
 *     ival = get_datetime64_value(val)             # <<<<<<<<<<<<<<
 * 
 *     if unit != PANDAS_FR_ns:
 */
  __pyx_v_ival = get_datetime64_value(__pyx_v_val);

  /* "pandas/tslib.pyx":1561
 *     ival = get_datetime64_value(val)
 * 
 *     if unit != PANDAS_FR_ns:             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(ival, unit, &dts)
 *         _check_dts_bounds(&dts)
 */
  __pyx_t_1 = (__pyx_v_unit != PANDAS_FR_ns);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1562
 * 
 *     if unit != PANDAS_FR_ns:
 *         pandas_datetime_to_datetimestruct(ival, unit, &dts)             # <<<<<<<<<<<<<<
 *         _check_dts_bounds(&dts)
 *         return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 */
    pandas_datetime_to_datetimestruct(__pyx_v_ival, __pyx_v_unit, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":1563
 *     if unit != PANDAS_FR_ns:
 *         pandas_datetime_to_datetimestruct(ival, unit, &dts)
 *         _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *         return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 *     else:
 */
    __pyx_t_2 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":1564
 *         pandas_datetime_to_datetimestruct(ival, unit, &dts)
 *         _check_dts_bounds(&dts)
 *         return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *     else:
 *         return ival
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1566
 *         return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 *     else:
 *         return ival             # <<<<<<<<<<<<<<
 * 
 * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ival); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

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

/* "pandas/tslib.pyx":1568
 *         return ival
 * 
 * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1:             # <<<<<<<<<<<<<<
 *     """ return a casting of the unit represented to nanoseconds
 *         round the fractional part of a float to our precision, p """
 */

static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_cast_from_unit(PyObject *__pyx_v_ts, PyObject *__pyx_v_unit, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_m = NULL;
  long __pyx_v_p;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_frac = NULL;
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cast_from_unit", 0);

  /* "pandas/tslib.pyx":1571
 *     """ return a casting of the unit represented to nanoseconds
 *         round the fractional part of a float to our precision, p """
 *     if unit == 'D' or unit == 'd':             # <<<<<<<<<<<<<<
 *         m = 1000000000L * 86400
 *         p = 6
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_2) {
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__d), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1572
 *         round the fractional part of a float to our precision, p """
 *     if unit == 'D' or unit == 'd':
 *         m = 1000000000L * 86400             # <<<<<<<<<<<<<<
 *         p = 6
 *     elif unit == 's':
 */
    __Pyx_INCREF(__pyx_int_86400000000000L);
    __pyx_v_m = __pyx_int_86400000000000L;

    /* "pandas/tslib.pyx":1573
 *     if unit == 'D' or unit == 'd':
 *         m = 1000000000L * 86400
 *         p = 6             # <<<<<<<<<<<<<<
 *     elif unit == 's':
 *         m = 1000000000L
 */
    __pyx_v_p = 6;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1574
 *         m = 1000000000L * 86400
 *         p = 6
 *     elif unit == 's':             # <<<<<<<<<<<<<<
 *         m = 1000000000L
 *         p = 6
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1575
 *         p = 6
 *     elif unit == 's':
 *         m = 1000000000L             # <<<<<<<<<<<<<<
 *         p = 6
 *     elif unit == 'ms':
 */
    __Pyx_INCREF(__pyx_int_1000000000L);
    __pyx_v_m = __pyx_int_1000000000L;

    /* "pandas/tslib.pyx":1576
 *     elif unit == 's':
 *         m = 1000000000L
 *         p = 6             # <<<<<<<<<<<<<<
 *     elif unit == 'ms':
 *         m = 1000000L
 */
    __pyx_v_p = 6;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1577
 *         m = 1000000000L
 *         p = 6
 *     elif unit == 'ms':             # <<<<<<<<<<<<<<
 *         m = 1000000L
 *         p = 3
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__ms), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1578
 *         p = 6
 *     elif unit == 'ms':
 *         m = 1000000L             # <<<<<<<<<<<<<<
 *         p = 3
 *     elif unit == 'us':
 */
    __Pyx_INCREF(__pyx_int_1000000L);
    __pyx_v_m = __pyx_int_1000000L;

    /* "pandas/tslib.pyx":1579
 *     elif unit == 'ms':
 *         m = 1000000L
 *         p = 3             # <<<<<<<<<<<<<<
 *     elif unit == 'us':
 *         m = 1000L
 */
    __pyx_v_p = 3;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1580
 *         m = 1000000L
 *         p = 3
 *     elif unit == 'us':             # <<<<<<<<<<<<<<
 *         m = 1000L
 *         p = 0
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_unit, ((PyObject *)__pyx_n_s__us), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1581
 *         p = 3
 *     elif unit == 'us':
 *         m = 1000L             # <<<<<<<<<<<<<<
 *         p = 0
 *     else:
 */
    __Pyx_INCREF(__pyx_int_1000L);
    __pyx_v_m = __pyx_int_1000L;

    /* "pandas/tslib.pyx":1582
 *     elif unit == 'us':
 *         m = 1000L
 *         p = 0             # <<<<<<<<<<<<<<
 *     else:
 *         m = 1L
 */
    __pyx_v_p = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1584
 *         p = 0
 *     else:
 *         m = 1L             # <<<<<<<<<<<<<<
 *         p = 0
 * 
 */
    __Pyx_INCREF(__pyx_int_1L);
    __pyx_v_m = __pyx_int_1L;

    /* "pandas/tslib.pyx":1585
 *     else:
 *         m = 1L
 *         p = 0             # <<<<<<<<<<<<<<
 * 
 *     # just give me the unit back
 */
    __pyx_v_p = 0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1588
 * 
 *     # just give me the unit back
 *     if ts is None:             # <<<<<<<<<<<<<<
 *         return m
 * 
 */
  __pyx_t_4 = (__pyx_v_ts == Py_None);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1589
 *     # just give me the unit back
 *     if ts is None:
 *         return m             # <<<<<<<<<<<<<<
 * 
 *     # cast the unit, multiply base/frace separately
 */
    __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_m); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1593
 *     # cast the unit, multiply base/frace separately
 *     # to avoid precision issues from float -> int
 *     base = <int64_t> ts             # <<<<<<<<<<<<<<
 *     frac = ts-base
 *     if p:
 */
  __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_ts); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(((__pyx_t_5numpy_int64_t)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1594
 *     # to avoid precision issues from float -> int
 *     base = <int64_t> ts
 *     frac = ts-base             # <<<<<<<<<<<<<<
 *     if p:
 *        frac = round(frac,p)
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_ts, __pyx_v_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_frac = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1595
 *     base = <int64_t> ts
 *     frac = ts-base
 *     if p:             # <<<<<<<<<<<<<<
 *        frac = round(frac,p)
 *     return <int64_t> (base*m) + <int64_t> (frac*m)
 */
  if (__pyx_v_p) {

    /* "pandas/tslib.pyx":1596
 *     frac = ts-base
 *     if p:
 *        frac = round(frac,p)             # <<<<<<<<<<<<<<
 *     return <int64_t> (base*m) + <int64_t> (frac*m)
 * 
 */
    __pyx_t_1 = PyInt_FromLong(__pyx_v_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_frac);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_frac);
    __Pyx_GIVEREF(__pyx_v_frac);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_round, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_frac);
    __pyx_v_frac = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":1597
 *     if p:
 *        frac = round(frac,p)
 *     return <int64_t> (base*m) + <int64_t> (frac*m)             # <<<<<<<<<<<<<<
 * 
 * def cast_to_nanoseconds(ndarray arr):
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_base, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_5 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_frac, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_7 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = (((__pyx_t_5numpy_int64_t)__pyx_t_5) + ((__pyx_t_5numpy_int64_t)__pyx_t_7));
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_frac);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_36cast_from_unit[] = " return a casting of the unit represented to nanoseconds\n        round the fractional part of a float to our precision, p ";
static PyObject *__pyx_pw_6pandas_5tslib_37cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cast_from_unit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ts,&__pyx_n_s__unit,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__ts)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__unit)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cast_from_unit", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cast_from_unit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __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_ts = values[0];
    __pyx_v_unit = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cast_from_unit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.cast_from_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_36cast_from_unit(__pyx_self, __pyx_v_ts, __pyx_v_unit);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1568
 *         return ival
 * 
 * cpdef inline int64_t cast_from_unit(object ts, object unit) except -1:             # <<<<<<<<<<<<<<
 *     """ return a casting of the unit represented to nanoseconds
 *         round the fractional part of a float to our precision, p """
 */

static PyObject *__pyx_pf_6pandas_5tslib_36cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_int64_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cast_from_unit", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_5tslib_cast_from_unit(__pyx_v_ts, __pyx_v_unit, 0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

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

/* "pandas/tslib.pyx":1599
 *     return <int64_t> (base*m) + <int64_t> (frac*m)
 * 
 * def cast_to_nanoseconds(ndarray arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = arr.size
 */

static PyObject *__pyx_pf_6pandas_5tslib_38cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_ivalues = 0;
  PyArrayObject *__pyx_v_iresult = 0;
  PANDAS_DATETIMEUNIT __pyx_v_unit;
  pandas_datetimestruct __pyx_v_dts;
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_iresult;
  __Pyx_Buffer __pyx_pybuffer_iresult;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ivalues;
  __Pyx_Buffer __pyx_pybuffer_ivalues;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cast_to_nanoseconds", 0);
  __pyx_pybuffer_ivalues.pybuffer.buf = NULL;
  __pyx_pybuffer_ivalues.refcount = 0;
  __pyx_pybuffernd_ivalues.data = NULL;
  __pyx_pybuffernd_ivalues.rcbuffer = &__pyx_pybuffer_ivalues;
  __pyx_pybuffer_iresult.pybuffer.buf = NULL;
  __pyx_pybuffer_iresult.refcount = 0;
  __pyx_pybuffernd_iresult.data = NULL;
  __pyx_pybuffernd_iresult.rcbuffer = &__pyx_pybuffer_iresult;

  /* "pandas/tslib.pyx":1601
 * def cast_to_nanoseconds(ndarray arr):
 *     cdef:
 *         Py_ssize_t i, n = arr.size             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] ivalues, iresult
 *         PANDAS_DATETIMEUNIT unit
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __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[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_2;

  /* "pandas/tslib.pyx":1606
 *         pandas_datetimestruct dts
 * 
 *     shape = (<object> arr).shape             # <<<<<<<<<<<<<<
 * 
 *     ivalues = arr.view(np.int64).ravel()
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_shape = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1608
 *     shape = (<object> arr).shape
 * 
 *     ivalues = arr.view(np.int64).ravel()             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(shape, dtype='M8[ns]')
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_ivalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_ivalues.diminfo[0].strides = __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ivalues.diminfo[0].shape = __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_ivalues = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1610
 *     ivalues = arr.view(np.int64).ravel()
 * 
 *     result = np.empty(shape, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *     iresult = result.ravel().view(np.int64)
 * 
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_shape);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape);
  __Pyx_GIVEREF(__pyx_v_shape);
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "pandas/tslib.pyx":1611
 * 
 *     result = np.empty(shape, dtype='M8[ns]')
 *     iresult = result.ravel().view(np.int64)             # <<<<<<<<<<<<<<
 * 
 *     if len(iresult) == 0:
 */
  __pyx_t_10 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__ravel); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__view); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __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[0]; __pyx_lineno = 1611; __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_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.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_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer, (PyObject*)__pyx_v_iresult, &__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_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_iresult.diminfo[0].strides = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iresult.diminfo[0].shape = __pyx_pybuffernd_iresult.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_iresult = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1613
 *     iresult = result.ravel().view(np.int64)
 * 
 *     if len(iresult) == 0:             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_iresult)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = (__pyx_t_2 == 0);
  if (__pyx_t_11) {

    /* "pandas/tslib.pyx":1614
 * 
 *     if len(iresult) == 0:
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     unit = get_datetime64_unit(arr.flat[0])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1616
 *         return result
 * 
 *     unit = get_datetime64_unit(arr.flat[0])             # <<<<<<<<<<<<<<
 *     if unit == 3:
 *         raise ValueError('NumPy 1.6.1 business freq not supported')
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__flat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_unit = get_datetime64_unit(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1617
 * 
 *     unit = get_datetime64_unit(arr.flat[0])
 *     if unit == 3:             # <<<<<<<<<<<<<<
 *         raise ValueError('NumPy 1.6.1 business freq not supported')
 * 
 */
  __pyx_t_11 = (__pyx_v_unit == 3);
  if (__pyx_t_11) {

    /* "pandas/tslib.pyx":1618
 *     unit = get_datetime64_unit(arr.flat[0])
 *     if unit == 3:
 *         raise ValueError('NumPy 1.6.1 business freq not supported')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1620
 *         raise ValueError('NumPy 1.6.1 business freq not supported')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts)
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/tslib.pyx":1621
 * 
 *     for i in range(n):
 *         pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts)             # <<<<<<<<<<<<<<
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 *         _check_dts_bounds(&dts)
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_ivalues.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ivalues.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ivalues.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_ivalues.diminfo[0].strides)), __pyx_v_unit, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":1622
 *     for i in range(n):
 *         pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts)
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *         _check_dts_bounds(&dts)
 * 
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_iresult.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_iresult.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_iresult.diminfo[0].strides) = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":1623
 *         pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts)
 *         iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 *         _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = __pyx_f_6pandas_5tslib__check_dts_bounds((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pandas/tslib.pyx":1625
 *         _check_dts_bounds(&dts)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.cast_to_nanoseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iresult.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ivalues.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ivalues);
  __Pyx_XDECREF((PyObject *)__pyx_v_iresult);
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_41pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt); /*proto*/
static char __pyx_doc_6pandas_5tslib_40pydt_to_i8[] = "\n    Convert to int64 representation compatible with numpy datetime64; converts\n    to UTC\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_41pydt_to_i8 = {__Pyx_NAMESTR("pydt_to_i8"), (PyCFunction)__pyx_pw_6pandas_5tslib_41pydt_to_i8, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_40pydt_to_i8)};
static PyObject *__pyx_pw_6pandas_5tslib_41pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pydt_to_i8 (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_40pydt_to_i8(__pyx_self, ((PyObject *)__pyx_v_pydt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1631
 * 
 * 
 * def pydt_to_i8(object pydt):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert to int64 representation compatible with numpy datetime64; converts
 */

static PyObject *__pyx_pf_6pandas_5tslib_40pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt) {
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pydt_to_i8", 0);

  /* "pandas/tslib.pyx":1639
 *         _TSObject ts
 * 
 *     ts = convert_to_tsobject(pydt, None, None)             # <<<<<<<<<<<<<<
 * 
 *     return ts.value
 */
  __pyx_t_1 = Py_None;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = Py_None;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_pydt, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1641
 *     ts = convert_to_tsobject(pydt, None, None)
 * 
 *     return ts.value             # <<<<<<<<<<<<<<
 * 
 * def i8_to_pydt(int64_t i8, object tzinfo = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_ts->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_43i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_42i8_to_pydt[] = "\n    Inverse of pydt_to_i8\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_43i8_to_pydt = {__Pyx_NAMESTR("i8_to_pydt"), (PyCFunction)__pyx_pw_6pandas_5tslib_43i8_to_pydt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_42i8_to_pydt)};
static PyObject *__pyx_pw_6pandas_5tslib_43i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_i8;
  CYTHON_UNUSED PyObject *__pyx_v_tzinfo = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("i8_to_pydt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__i8,&__pyx_n_s__tzinfo,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":1643
 *     return ts.value
 * 
 * def i8_to_pydt(int64_t i8, object tzinfo = None):             # <<<<<<<<<<<<<<
 *     '''
 *     Inverse of pydt_to_i8
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i8)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tzinfo);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "i8_to_pydt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __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_i8 = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_i8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_tzinfo = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("i8_to_pydt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.i8_to_pydt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_42i8_to_pydt(__pyx_self, __pyx_v_i8, __pyx_v_tzinfo);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_42i8_to_pydt(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_i8, CYTHON_UNUSED PyObject *__pyx_v_tzinfo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("i8_to_pydt", 0);

  /* "pandas/tslib.pyx":1647
 *     Inverse of pydt_to_i8
 *     '''
 *     return Timestamp(i8)             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_i8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_45tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_45tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_45tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_45tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_vals = 0;
  PyObject *__pyx_v_tz1 = 0;
  PyObject *__pyx_v_tz2 = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vals,&__pyx_n_s__tz1,&__pyx_n_s__tz2,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__vals)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __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_vals = ((PyArrayObject *)values[0]);
    __pyx_v_tz1 = values[1];
    __pyx_v_tz2 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vals), __pyx_ptype_5numpy_ndarray, 1, "vals", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_44tz_convert(__pyx_self, __pyx_v_vals, __pyx_v_tz1, __pyx_v_tz2);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1660
 *     have_pytz = False
 * 
 * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] utc_dates, result, trans, deltas
 */

static PyObject *__pyx_pf_6pandas_5tslib_44tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2) {
  PyArrayObject *__pyx_v_utc_dates = 0;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_trans = 0;
  PyArrayObject *__pyx_v_deltas = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_pos;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int64_t __pyx_v_v;
  __pyx_t_5numpy_int64_t __pyx_v_offset;
  pandas_datetimestruct __pyx_v_dts;
  CYTHON_UNUSED PyObject *__pyx_v_pytz = NULL;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  Py_ssize_t __pyx_v_trans_len;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas;
  __Pyx_Buffer __pyx_pybuffer_deltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_trans;
  __Pyx_Buffer __pyx_pybuffer_trans;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_utc_dates;
  __Pyx_Buffer __pyx_pybuffer_utc_dates;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vals;
  __Pyx_Buffer __pyx_pybuffer_vals;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  long __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  long __pyx_t_28;
  long __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  int __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_convert", 0);
  __pyx_pybuffer_utc_dates.pybuffer.buf = NULL;
  __pyx_pybuffer_utc_dates.refcount = 0;
  __pyx_pybuffernd_utc_dates.data = NULL;
  __pyx_pybuffernd_utc_dates.rcbuffer = &__pyx_pybuffer_utc_dates;
  __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_trans.pybuffer.buf = NULL;
  __pyx_pybuffer_trans.refcount = 0;
  __pyx_pybuffernd_trans.data = NULL;
  __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans;
  __pyx_pybuffer_deltas.pybuffer.buf = NULL;
  __pyx_pybuffer_deltas.refcount = 0;
  __pyx_pybuffernd_deltas.data = NULL;
  __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas;
  __pyx_pybuffer_vals.pybuffer.buf = NULL;
  __pyx_pybuffer_vals.refcount = 0;
  __pyx_pybuffernd_vals.data = NULL;
  __pyx_pybuffernd_vals.rcbuffer = &__pyx_pybuffer_vals;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_vals.diminfo[0].strides = __pyx_pybuffernd_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vals.diminfo[0].shape = __pyx_pybuffernd_vals.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":1663
 *     cdef:
 *         ndarray[int64_t] utc_dates, result, trans, deltas
 *         Py_ssize_t i, pos, n = len(vals)             # <<<<<<<<<<<<<<
 *         int64_t v, offset
 *         pandas_datetimestruct dts
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_vals)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1667
 *         pandas_datetimestruct dts
 * 
 *     if not have_pytz:             # <<<<<<<<<<<<<<
 *         import pytz
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__have_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1668
 * 
 *     if not have_pytz:
 *         import pytz             # <<<<<<<<<<<<<<
 * 
 *     # Convert to UTC
 */
    __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_pytz = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1672
 *     # Convert to UTC
 * 
 *     if _get_zone(tz1) != 'UTC':             # <<<<<<<<<<<<<<
 *         utc_dates = np.empty(n, dtype=np.int64)
 *         if _is_tzlocal(tz1):
 */
  __pyx_t_2 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__UTC), Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1673
 * 
 *     if _get_zone(tz1) != 'UTC':
 *         utc_dates = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         if _is_tzlocal(tz1):
 *             for i in range(n):
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_utc_dates, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        }
      }
      __pyx_pybuffernd_utc_dates.diminfo[0].strides = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_utc_dates.diminfo[0].shape = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_9 = 0;
    __pyx_v_utc_dates = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "pandas/tslib.pyx":1674
 *     if _get_zone(tz1) != 'UTC':
 *         utc_dates = np.empty(n, dtype=np.int64)
 *         if _is_tzlocal(tz1):             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 v = vals[i]
 */
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_tz1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz1);
    __Pyx_GIVEREF(__pyx_v_tz1);
    __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":1675
 *         utc_dates = np.empty(n, dtype=np.int64)
 *         if _is_tzlocal(tz1):
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 v = vals[i]
 *                 pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_1; __pyx_t_14+=1) {
        __pyx_v_i = __pyx_t_14;

        /* "pandas/tslib.pyx":1676
 *         if _is_tzlocal(tz1):
 *             for i in range(n):
 *                 v = vals[i]             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *                 dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_pybuffernd_vals.diminfo[0].shape;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_vals.diminfo[0].strides));

        /* "pandas/tslib.pyx":1677
 *             for i in range(n):
 *                 v = vals[i]
 *                 pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                               dts.min, dts.sec, dts.us, tz1)
 */
        pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":1678
 *                 v = vals[i]
 *                 pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *                 dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                               dts.min, dts.sec, dts.us, tz1)
 *                 delta = (int(total_seconds(_get_utcoffset(tz1, dt)))
 */
        __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "pandas/tslib.pyx":1679
 *                 pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *                 dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                               dts.min, dts.sec, dts.us, tz1)             # <<<<<<<<<<<<<<
 *                 delta = (int(total_seconds(_get_utcoffset(tz1, dt)))
 *                          * 1000000000)
 */
        __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_v_tz1);
        PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_v_tz1);
        __Pyx_GIVEREF(__pyx_v_tz1);
        __pyx_t_6 = 0;
        __pyx_t_5 = 0;
        __pyx_t_8 = 0;
        __pyx_t_2 = 0;
        __pyx_t_7 = 0;
        __pyx_t_16 = 0;
        __pyx_t_17 = 0;
        __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
        __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
        __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_17);
        __pyx_t_17 = 0;

        /* "pandas/tslib.pyx":1680
 *                 dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                               dts.min, dts.sec, dts.us, tz1)
 *                 delta = (int(total_seconds(_get_utcoffset(tz1, dt)))             # <<<<<<<<<<<<<<
 *                          * 1000000000)
 *                 utc_dates[i] = v - delta
 */
        __pyx_t_17 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz1, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_17)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        __pyx_t_18 = 0;
        __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
        __pyx_t_17 = PyNumber_Multiply(__pyx_t_18, __pyx_int_1000000000); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_XDECREF(__pyx_v_delta);
        __pyx_v_delta = __pyx_t_17;
        __pyx_t_17 = 0;

        /* "pandas/tslib.pyx":1682
 *                 delta = (int(total_seconds(_get_utcoffset(tz1, dt)))
 *                          * 1000000000)
 *                 utc_dates[i] = v - delta             # <<<<<<<<<<<<<<
 *         else:
 *             deltas = _get_deltas(tz1)
 */
        __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = PyNumber_Subtract(__pyx_t_17, __pyx_v_delta); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_19 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_18); if (unlikely((__pyx_t_19 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_20 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_20 < 0) {
          __pyx_t_20 += __pyx_pybuffernd_utc_dates.diminfo[0].shape;
          if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_utc_dates.diminfo[0].strides) = __pyx_t_19;
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1684
 *                 utc_dates[i] = v - delta
 *         else:
 *             deltas = _get_deltas(tz1)             # <<<<<<<<<<<<<<
 *             trans = _get_transitions(tz1)
 *             pos = trans.searchsorted(vals[0]) - 1
 */
      __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_INCREF(__pyx_v_tz1);
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz1);
      __Pyx_GIVEREF(__pyx_v_tz1);
      __pyx_t_16 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = ((PyArrayObject *)__pyx_t_16);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_10 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
          }
        }
        __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_9 = 0;
      __pyx_v_deltas = ((PyArrayObject *)__pyx_t_16);
      __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":1685
 *         else:
 *             deltas = _get_deltas(tz1)
 *             trans = _get_transitions(tz1)             # <<<<<<<<<<<<<<
 *             pos = trans.searchsorted(vals[0]) - 1
 *             if pos < 0:
 */
      __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_INCREF(__pyx_v_tz1);
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_tz1);
      __Pyx_GIVEREF(__pyx_v_tz1);
      __pyx_t_18 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = ((PyArrayObject *)__pyx_t_18);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_10 < 0)) {
          PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          }
        }
        __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
        if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_9 = 0;
      __pyx_v_trans = ((PyArrayObject *)__pyx_t_18);
      __pyx_t_18 = 0;

      /* "pandas/tslib.pyx":1686
 *             deltas = _get_deltas(tz1)
 *             trans = _get_transitions(tz1)
 *             pos = trans.searchsorted(vals[0]) - 1             # <<<<<<<<<<<<<<
 *             if pos < 0:
 *                 raise ValueError('First time before start of DST info')
 */
      __pyx_t_18 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_21 = 0;
      __pyx_t_10 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_vals.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
      __pyx_t_16 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_t_16); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_v_pos = __pyx_t_1;

      /* "pandas/tslib.pyx":1687
 *             trans = _get_transitions(tz1)
 *             pos = trans.searchsorted(vals[0]) - 1
 *             if pos < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError('First time before start of DST info')
 * 
 */
      __pyx_t_4 = (__pyx_v_pos < 0);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":1688
 *             pos = trans.searchsorted(vals[0]) - 1
 *             if pos < 0:
 *                 raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 * 
 *             offset = deltas[pos]
 */
        __pyx_t_16 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_Raise(__pyx_t_16, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "pandas/tslib.pyx":1690
 *                 raise ValueError('First time before start of DST info')
 * 
 *             offset = deltas[pos]             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 v = vals[i]
 */
      __pyx_t_1 = __pyx_v_pos;
      __pyx_t_10 = -1;
      if (__pyx_t_1 < 0) {
        __pyx_t_1 += __pyx_pybuffernd_deltas.diminfo[0].shape;
        if (unlikely(__pyx_t_1 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_deltas.diminfo[0].strides));

      /* "pandas/tslib.pyx":1691
 * 
 *             offset = deltas[pos]
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 v = vals[i]
 *                 if v >= [pos + 1]:
 */
      __pyx_t_14 = __pyx_v_n;
      for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_14; __pyx_t_22+=1) {
        __pyx_v_i = __pyx_t_22;

        /* "pandas/tslib.pyx":1692
 *             offset = deltas[pos]
 *             for i in range(n):
 *                 v = vals[i]             # <<<<<<<<<<<<<<
 *                 if v >= [pos + 1]:
 *                     pos += 1
 */
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_23 < 0) {
          __pyx_t_23 += __pyx_pybuffernd_vals.diminfo[0].shape;
          if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_vals.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_vals.diminfo[0].strides));

        /* "pandas/tslib.pyx":1693
 *             for i in range(n):
 *                 v = vals[i]
 *                 if v >= [pos + 1]:             # <<<<<<<<<<<<<<
 *                     pos += 1
 *                     offset = deltas[pos]
 */
        __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = PyInt_FromSsize_t((__pyx_v_pos + 1)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_17);
        __pyx_t_17 = 0;
        __pyx_t_17 = PyObject_RichCompare(__pyx_t_16, ((PyObject *)__pyx_t_18), Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (__pyx_t_4) {

          /* "pandas/tslib.pyx":1694
 *                 v = vals[i]
 *                 if v >= [pos + 1]:
 *                     pos += 1             # <<<<<<<<<<<<<<
 *                     offset = deltas[pos]
 *                 utc_dates[i] = v - offset
 */
          __pyx_v_pos = (__pyx_v_pos + 1);

          /* "pandas/tslib.pyx":1695
 *                 if v >= [pos + 1]:
 *                     pos += 1
 *                     offset = deltas[pos]             # <<<<<<<<<<<<<<
 *                 utc_dates[i] = v - offset
 *     else:
 */
          __pyx_t_24 = __pyx_v_pos;
          __pyx_t_10 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_24 += __pyx_pybuffernd_deltas.diminfo[0].shape;
            if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0;
          if (unlikely(__pyx_t_10 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_10);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_deltas.diminfo[0].strides));
          goto __pyx_L11;
        }
        __pyx_L11:;

        /* "pandas/tslib.pyx":1696
 *                     pos += 1
 *                     offset = deltas[pos]
 *                 utc_dates[i] = v - offset             # <<<<<<<<<<<<<<
 *     else:
 *         utc_dates = vals
 */
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_10 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_utc_dates.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0;
        if (unlikely(__pyx_t_10 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_10);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_utc_dates.diminfo[0].strides) = (__pyx_v_v - __pyx_v_offset);
      }
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1698
 *                 utc_dates[i] = v - offset
 *     else:
 *         utc_dates = vals             # <<<<<<<<<<<<<<
 * 
 *     if _get_zone(tz2) == 'UTC':
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_vals), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_10 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer, (PyObject*)__pyx_v_utc_dates, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_utc_dates.diminfo[0].strides = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_utc_dates.diminfo[0].shape = __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_vals));
    __pyx_v_utc_dates = ((PyArrayObject *)__pyx_v_vals);
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1700
 *         utc_dates = vals
 * 
 *     if _get_zone(tz2) == 'UTC':             # <<<<<<<<<<<<<<
 *         return utc_dates
 * 
 */
  __pyx_t_17 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = PyObject_RichCompare(__pyx_t_17, ((PyObject *)__pyx_n_s__UTC), Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1701
 * 
 *     if _get_zone(tz2) == 'UTC':
 *         return utc_dates             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=np.int64)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_utc_dates));
    __pyx_r = ((PyObject *)__pyx_v_utc_dates);
    goto __pyx_L0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "pandas/tslib.pyx":1703
 *         return utc_dates
 * 
 *     result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     if _is_tzlocal(tz2):
 *         for i in range(n):
 */
  __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_17 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__empty); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_18);
  __pyx_t_18 = 0;
  __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_18));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_16), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":1704
 * 
 *     result = np.empty(n, dtype=np.int64)
 *     if _is_tzlocal(tz2):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             v = utc_dates[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_INCREF(__pyx_v_tz2);
  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  __pyx_t_16 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1705
 *     result = np.empty(n, dtype=np.int64)
 *     if _is_tzlocal(tz2):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             v = utc_dates[i]
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 */
    __pyx_t_14 = __pyx_v_n;
    for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_14; __pyx_t_22+=1) {
      __pyx_v_i = __pyx_t_22;

      /* "pandas/tslib.pyx":1706
 *     if _is_tzlocal(tz2):
 *         for i in range(n):
 *             v = utc_dates[i]             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
      __pyx_t_26 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_26 < 0) {
        __pyx_t_26 += __pyx_pybuffernd_utc_dates.diminfo[0].shape;
        if (unlikely(__pyx_t_26 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_utc_dates.diminfo[0].strides));

      /* "pandas/tslib.pyx":1707
 *         for i in range(n):
 *             v = utc_dates[i]
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz2)
 */
      pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":1708
 *             v = utc_dates[i]
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                           dts.min, dts.sec, dts.us, tz2)
 *             delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 */
      __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_18 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);

      /* "pandas/tslib.pyx":1709
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz2)             # <<<<<<<<<<<<<<
 *             delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 *             result[i] = v + delta
 */
      __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_18);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_tz2);
      PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_v_tz2);
      __Pyx_GIVEREF(__pyx_v_tz2);
      __pyx_t_16 = 0;
      __pyx_t_18 = 0;
      __pyx_t_2 = 0;
      __pyx_t_17 = 0;
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
      __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pandas/tslib.pyx":1710
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz2)
 *             delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *             result[i] = v + delta
 *             return result
 */
      __pyx_t_5 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz2, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Multiply(__pyx_t_6, __pyx_int_1000000000); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_v_delta);
      __pyx_v_delta = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/tslib.pyx":1711
 *                           dts.min, dts.sec, dts.us, tz2)
 *             delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 *             result[i] = v + delta             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_delta); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_19 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_6); if (unlikely((__pyx_t_19 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_27 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_27 < 0) {
        __pyx_t_27 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_27 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_19;

      /* "pandas/tslib.pyx":1712
 *             delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 *             result[i] = v + delta
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     # Convert UTC to other timezone
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_result));
      __pyx_r = ((PyObject *)__pyx_v_result);
      goto __pyx_L0;
    }
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "pandas/tslib.pyx":1715
 * 
 *     # Convert UTC to other timezone
 *     trans = _get_transitions(tz2)             # <<<<<<<<<<<<<<
 *     deltas = _get_deltas(tz2)
 *     pos = trans.searchsorted(utc_dates[0])
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_tz2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __Pyx_XDECREF(((PyObject *)__pyx_v_trans));
  __pyx_v_trans = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/tslib.pyx":1716
 *     # Convert UTC to other timezone
 *     trans = _get_transitions(tz2)
 *     deltas = _get_deltas(tz2)             # <<<<<<<<<<<<<<
 *     pos = trans.searchsorted(utc_dates[0])
 *     if pos == 0:
 */
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_tz2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __Pyx_XDECREF(((PyObject *)__pyx_v_deltas));
  __pyx_v_deltas = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":1717
 *     trans = _get_transitions(tz2)
 *     deltas = _get_deltas(tz2)
 *     pos = trans.searchsorted(utc_dates[0])             # <<<<<<<<<<<<<<
 *     if pos == 0:
 *         raise ValueError('First time before start of DST info')
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_28 = 0;
  __pyx_t_10 = -1;
  if (__pyx_t_28 < 0) {
    __pyx_t_28 += __pyx_pybuffernd_utc_dates.diminfo[0].shape;
    if (unlikely(__pyx_t_28 < 0)) __pyx_t_10 = 0;
  } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0;
  if (unlikely(__pyx_t_10 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_10);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_utc_dates.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_pos = __pyx_t_14;

  /* "pandas/tslib.pyx":1718
 *     deltas = _get_deltas(tz2)
 *     pos = trans.searchsorted(utc_dates[0])
 *     if pos == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('First time before start of DST info')
 *     elif pos == len(trans):
 */
  __pyx_t_4 = (__pyx_v_pos == 0);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1719
 *     pos = trans.searchsorted(utc_dates[0])
 *     if pos == 0:
 *         raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 *     elif pos == len(trans):
 *         return utc_dates + deltas[-1]
 */
    __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L16;
  }

  /* "pandas/tslib.pyx":1720
 *     if pos == 0:
 *         raise ValueError('First time before start of DST info')
 *     elif pos == len(trans):             # <<<<<<<<<<<<<<
 *         return utc_dates + deltas[-1]
 * 
 */
  __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_v_pos == __pyx_t_14);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1721
 *         raise ValueError('First time before start of DST info')
 *     elif pos == len(trans):
 *         return utc_dates + deltas[-1]             # <<<<<<<<<<<<<<
 * 
 *     # TODO: this assumed sortedness :/
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_29 = -1;
    __pyx_t_10 = -1;
    if (__pyx_t_29 < 0) {
      __pyx_t_29 += __pyx_pybuffernd_deltas.diminfo[0].shape;
      if (unlikely(__pyx_t_29 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_deltas.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_v_utc_dates), __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "pandas/tslib.pyx":1724
 * 
 *     # TODO: this assumed sortedness :/
 *     pos -= 1             # <<<<<<<<<<<<<<
 * 
 *     offset = deltas[pos]
 */
  __pyx_v_pos = (__pyx_v_pos - 1);

  /* "pandas/tslib.pyx":1726
 *     pos -= 1
 * 
 *     offset = deltas[pos]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t trans_len = len(trans)
 * 
 */
  __pyx_t_14 = __pyx_v_pos;
  __pyx_t_10 = -1;
  if (__pyx_t_14 < 0) {
    __pyx_t_14 += __pyx_pybuffernd_deltas.diminfo[0].shape;
    if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0;
  } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0;
  if (unlikely(__pyx_t_10 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_10);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_deltas.diminfo[0].strides));

  /* "pandas/tslib.pyx":1727
 * 
 *     offset = deltas[pos]
 *     cdef Py_ssize_t trans_len = len(trans)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_trans_len = __pyx_t_22;

  /* "pandas/tslib.pyx":1729
 *     cdef Py_ssize_t trans_len = len(trans)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = utc_dates[i]
 *         if (pos + 1) < trans_len and v >= trans[pos + 1]:
 */
  __pyx_t_22 = __pyx_v_n;
  for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_22; __pyx_t_30+=1) {
    __pyx_v_i = __pyx_t_30;

    /* "pandas/tslib.pyx":1730
 * 
 *     for i in range(n):
 *         v = utc_dates[i]             # <<<<<<<<<<<<<<
 *         if (pos + 1) < trans_len and v >= trans[pos + 1]:
 *             pos += 1
 */
    __pyx_t_31 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_31 < 0) {
      __pyx_t_31 += __pyx_pybuffernd_utc_dates.diminfo[0].shape;
      if (unlikely(__pyx_t_31 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_utc_dates.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_utc_dates.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_utc_dates.diminfo[0].strides));

    /* "pandas/tslib.pyx":1731
 *     for i in range(n):
 *         v = utc_dates[i]
 *         if (pos + 1) < trans_len and v >= trans[pos + 1]:             # <<<<<<<<<<<<<<
 *             pos += 1
 *             offset = deltas[pos]
 */
    __pyx_t_4 = ((__pyx_v_pos + 1) < __pyx_v_trans_len);
    if (__pyx_t_4) {
      __pyx_t_32 = (__pyx_v_pos + 1);
      __pyx_t_10 = -1;
      if (__pyx_t_32 < 0) {
        __pyx_t_32 += __pyx_pybuffernd_trans.diminfo[0].shape;
        if (unlikely(__pyx_t_32 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_trans.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = (__pyx_v_v >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_trans.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_trans.diminfo[0].strides)));
      __pyx_t_33 = __pyx_t_3;
    } else {
      __pyx_t_33 = __pyx_t_4;
    }
    if (__pyx_t_33) {

      /* "pandas/tslib.pyx":1732
 *         v = utc_dates[i]
 *         if (pos + 1) < trans_len and v >= trans[pos + 1]:
 *             pos += 1             # <<<<<<<<<<<<<<
 *             offset = deltas[pos]
 *         result[i] = v + offset
 */
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "pandas/tslib.pyx":1733
 *         if (pos + 1) < trans_len and v >= trans[pos + 1]:
 *             pos += 1
 *             offset = deltas[pos]             # <<<<<<<<<<<<<<
 *         result[i] = v + offset
 * 
 */
      __pyx_t_34 = __pyx_v_pos;
      __pyx_t_10 = -1;
      if (__pyx_t_34 < 0) {
        __pyx_t_34 += __pyx_pybuffernd_deltas.diminfo[0].shape;
        if (unlikely(__pyx_t_34 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_deltas.diminfo[0].strides));
      goto __pyx_L19;
    }
    __pyx_L19:;

    /* "pandas/tslib.pyx":1734
 *             pos += 1
 *             offset = deltas[pos]
 *         result[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_35 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_35 < 0) {
      __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_35 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = (__pyx_v_v + __pyx_v_offset);
  }

  /* "pandas/tslib.pyx":1736
 *         result[i] = v + offset
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def tz_convert_single(int64_t val, object tz1, object tz2):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_utc_dates.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_utc_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_trans);
  __Pyx_XDECREF((PyObject *)__pyx_v_deltas);
  __Pyx_XDECREF(__pyx_v_pytz);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_47tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_47tz_convert_single = {__Pyx_NAMESTR("tz_convert_single"), (PyCFunction)__pyx_pw_6pandas_5tslib_47tz_convert_single, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_47tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_val;
  PyObject *__pyx_v_tz1 = 0;
  PyObject *__pyx_v_tz2 = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_convert_single (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__val,&__pyx_n_s__tz1,&__pyx_n_s__tz2,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__val)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_convert_single") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __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_val = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_val == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_tz1 = values[1];
    __pyx_v_tz2 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_convert_single", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.tz_convert_single", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_46tz_convert_single(__pyx_self, __pyx_v_val, __pyx_v_tz1, __pyx_v_tz2);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1738
 *     return result
 * 
 * def tz_convert_single(int64_t val, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] trans, deltas
 */

static PyObject *__pyx_pf_6pandas_5tslib_46tz_convert_single(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_val, PyObject *__pyx_v_tz1, PyObject *__pyx_v_tz2) {
  PyArrayObject *__pyx_v_trans = 0;
  PyArrayObject *__pyx_v_deltas = 0;
  Py_ssize_t __pyx_v_pos;
  __pyx_t_5numpy_int64_t __pyx_v_offset;
  __pyx_t_5numpy_int64_t __pyx_v_utc_date;
  pandas_datetimestruct __pyx_v_dts;
  CYTHON_UNUSED PyObject *__pyx_v_pytz = NULL;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas;
  __Pyx_Buffer __pyx_pybuffer_deltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_trans;
  __Pyx_Buffer __pyx_pybuffer_trans;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_11;
  PyArrayObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_convert_single", 0);
  __pyx_pybuffer_trans.pybuffer.buf = NULL;
  __pyx_pybuffer_trans.refcount = 0;
  __pyx_pybuffernd_trans.data = NULL;
  __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans;
  __pyx_pybuffer_deltas.pybuffer.buf = NULL;
  __pyx_pybuffer_deltas.refcount = 0;
  __pyx_pybuffernd_deltas.data = NULL;
  __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas;

  /* "pandas/tslib.pyx":1745
 *         pandas_datetimestruct dts
 * 
 *     if not have_pytz:             # <<<<<<<<<<<<<<
 *         import pytz
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__have_pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1746
 * 
 *     if not have_pytz:
 *         import pytz             # <<<<<<<<<<<<<<
 * 
 *     # Convert to UTC
 */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_pytz = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1749
 * 
 *     # Convert to UTC
 *     if _is_tzlocal(tz1):             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_tz1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz1);
  __Pyx_GIVEREF(__pyx_v_tz1);
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1750
 *     # Convert to UTC
 *     if _is_tzlocal(tz1):
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                       dts.min, dts.sec, dts.us, tz1)
 */
    pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":1751
 *     if _is_tzlocal(tz1):
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                       dts.min, dts.sec, dts.us, tz1)
 *         delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000
 */
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);

    /* "pandas/tslib.pyx":1752
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                       dts.min, dts.sec, dts.us, tz1)             # <<<<<<<<<<<<<<
 *         delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000
 *         utc_date = val - delta
 */
    __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_tz1);
    PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_v_tz1);
    __Pyx_GIVEREF(__pyx_v_tz1);
    __pyx_t_5 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":1753
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                       dts.min, dts.sec, dts.us, tz1)
 *         delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *         utc_date = val - delta
 *     elif _get_zone(tz1) != 'UTC':
 */
    __pyx_t_9 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz1, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_int_1000000000); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_delta = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":1754
 *                       dts.min, dts.sec, dts.us, tz1)
 *         delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000
 *         utc_date = val - delta             # <<<<<<<<<<<<<<
 *     elif _get_zone(tz1) != 'UTC':
 *         deltas = _get_deltas(tz1)
 */
    __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_v_delta); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_10); if (unlikely((__pyx_t_11 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_utc_date = __pyx_t_11;
    goto __pyx_L4;
  }

  /* "pandas/tslib.pyx":1755
 *         delta = int(total_seconds(_get_utcoffset(tz1, dt))) * 1000000000
 *         utc_date = val - delta
 *     elif _get_zone(tz1) != 'UTC':             # <<<<<<<<<<<<<<
 *         deltas = _get_deltas(tz1)
 *         trans = _get_transitions(tz1)
 */
  __pyx_t_10 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__UTC), Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1756
 *         utc_date = val - delta
 *     elif _get_zone(tz1) != 'UTC':
 *         deltas = _get_deltas(tz1)             # <<<<<<<<<<<<<<
 *         trans = _get_transitions(tz1)
 *         pos = trans.searchsorted(val) - 1
 */
    __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_tz1);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_tz1);
    __Pyx_GIVEREF(__pyx_v_tz1);
    __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = ((PyArrayObject *)__pyx_t_8);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
      __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_13 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
        }
      }
      __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = 0;
    __pyx_v_deltas = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "pandas/tslib.pyx":1757
 *     elif _get_zone(tz1) != 'UTC':
 *         deltas = _get_deltas(tz1)
 *         trans = _get_transitions(tz1)             # <<<<<<<<<<<<<<
 *         pos = trans.searchsorted(val) - 1
 *         if pos < 0:
 */
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_tz1);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_tz1);
    __Pyx_GIVEREF(__pyx_v_tz1);
    __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = ((PyArrayObject *)__pyx_t_9);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
      __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_13 < 0)) {
        PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
        }
      }
      __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = 0;
    __pyx_v_trans = ((PyArrayObject *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":1758
 *         deltas = _get_deltas(tz1)
 *         trans = _get_transitions(tz1)
 *         pos = trans.searchsorted(val) - 1             # <<<<<<<<<<<<<<
 *         if pos < 0:
 *             raise ValueError('First time before start of DST info')
 */
    __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Subtract(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_pos = __pyx_t_17;

    /* "pandas/tslib.pyx":1759
 *         trans = _get_transitions(tz1)
 *         pos = trans.searchsorted(val) - 1
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('First time before start of DST info')
 *         offset = deltas[pos]
 */
    __pyx_t_3 = (__pyx_v_pos < 0);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":1760
 *         pos = trans.searchsorted(val) - 1
 *         if pos < 0:
 *             raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 *         offset = deltas[pos]
 *         utc_date = val - offset
 */
      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "pandas/tslib.pyx":1761
 *         if pos < 0:
 *             raise ValueError('First time before start of DST info')
 *         offset = deltas[pos]             # <<<<<<<<<<<<<<
 *         utc_date = val - offset
 *     else:
 */
    __pyx_t_17 = __pyx_v_pos;
    __pyx_t_13 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_deltas.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_deltas.diminfo[0].strides));

    /* "pandas/tslib.pyx":1762
 *             raise ValueError('First time before start of DST info')
 *         offset = deltas[pos]
 *         utc_date = val - offset             # <<<<<<<<<<<<<<
 *     else:
 *         utc_date = val
 */
    __pyx_v_utc_date = (__pyx_v_val - __pyx_v_offset);
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1764
 *         utc_date = val - offset
 *     else:
 *         utc_date = val             # <<<<<<<<<<<<<<
 * 
 *     if _get_zone(tz2) == 'UTC':
 */
    __pyx_v_utc_date = __pyx_v_val;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1766
 *         utc_date = val
 * 
 *     if _get_zone(tz2) == 'UTC':             # <<<<<<<<<<<<<<
 *         return utc_date
 *     if _is_tzlocal(tz2):
 */
  __pyx_t_8 = __pyx_f_6pandas_5tslib__get_zone(__pyx_v_tz2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__UTC), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1767
 * 
 *     if _get_zone(tz2) == 'UTC':
 *         return utc_date             # <<<<<<<<<<<<<<
 *     if _is_tzlocal(tz2):
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/tslib.pyx":1768
 *     if _get_zone(tz2) == 'UTC':
 *         return utc_date
 *     if _is_tzlocal(tz2):             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_tz2);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1769
 *         return utc_date
 *     if _is_tzlocal(tz2):
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                       dts.min, dts.sec, dts.us, tz2)
 */
    pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":1770
 *     if _is_tzlocal(tz2):
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                       dts.min, dts.sec, dts.us, tz2)
 *         delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 */
    __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);

    /* "pandas/tslib.pyx":1771
 *         pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                       dts.min, dts.sec, dts.us, tz2)             # <<<<<<<<<<<<<<
 *         delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 *         return utc_date + delta
 */
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_tz2);
    PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_v_tz2);
    __Pyx_GIVEREF(__pyx_v_tz2);
    __pyx_t_9 = 0;
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
    __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":1772
 *         dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                       dts.min, dts.sec, dts.us, tz2)
 *         delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *         return utc_date + delta
 *     # Convert UTC to other timezone
 */
    __pyx_t_4 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz2, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_int_1000000000); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_delta);
    __pyx_v_delta = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":1773
 *                       dts.min, dts.sec, dts.us, tz2)
 *         delta = int(total_seconds(_get_utcoffset(tz2, dt))) * 1000000000
 *         return utc_date + delta             # <<<<<<<<<<<<<<
 *     # Convert UTC to other timezone
 *     trans = _get_transitions(tz2)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_delta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "pandas/tslib.pyx":1775
 *         return utc_date + delta
 *     # Convert UTC to other timezone
 *     trans = _get_transitions(tz2)             # <<<<<<<<<<<<<<
 *     deltas = _get_deltas(tz2)
 *     pos = trans.searchsorted(utc_date) - 1
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_tz2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
    __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_13 < 0)) {
      PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      }
    }
    __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_XDECREF(((PyObject *)__pyx_v_trans));
  __pyx_v_trans = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":1776
 *     # Convert UTC to other timezone
 *     trans = _get_transitions(tz2)
 *     deltas = _get_deltas(tz2)             # <<<<<<<<<<<<<<
 *     pos = trans.searchsorted(utc_date) - 1
 *     if pos < 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_tz2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_13 < 0)) {
      PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
      }
    }
    __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __Pyx_XDECREF(((PyObject *)__pyx_v_deltas));
  __pyx_v_deltas = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":1777
 *     trans = _get_transitions(tz2)
 *     deltas = _get_deltas(tz2)
 *     pos = trans.searchsorted(utc_date) - 1             # <<<<<<<<<<<<<<
 *     if pos < 0:
 *         raise ValueError('First time before start of DST info')
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_utc_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __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_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_pos = __pyx_t_18;

  /* "pandas/tslib.pyx":1778
 *     deltas = _get_deltas(tz2)
 *     pos = trans.searchsorted(utc_date) - 1
 *     if pos < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('First time before start of DST info')
 * 
 */
  __pyx_t_3 = (__pyx_v_pos < 0);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1779
 *     pos = trans.searchsorted(utc_date) - 1
 *     if pos < 0:
 *         raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 * 
 *     offset = deltas[pos]
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "pandas/tslib.pyx":1781
 *         raise ValueError('First time before start of DST info')
 * 
 *     offset = deltas[pos]             # <<<<<<<<<<<<<<
 *     return utc_date + offset
 * 
 */
  __pyx_t_18 = __pyx_v_pos;
  __pyx_t_13 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_deltas.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_13 = 0;
  if (unlikely(__pyx_t_13 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_13);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_offset = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_deltas.diminfo[0].strides));

  /* "pandas/tslib.pyx":1782
 * 
 *     offset = deltas[pos]
 *     return utc_date + offset             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_utc_date + __pyx_v_offset)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.tz_convert_single", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_trans);
  __Pyx_XDECREF((PyObject *)__pyx_v_deltas);
  __Pyx_XDECREF(__pyx_v_pytz);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_49_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static char __pyx_doc_6pandas_5tslib_48_get_transitions[] = "\n    Get UTC times of DST transitions\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_49_get_transitions = {__Pyx_NAMESTR("_get_transitions"), (PyCFunction)__pyx_pw_6pandas_5tslib_49_get_transitions, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_48_get_transitions)};
static PyObject *__pyx_pw_6pandas_5tslib_49_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_transitions (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_48_get_transitions(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1788
 * utc_offset_cache = {}
 * 
 * def _get_transitions(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC times of DST transitions
 */

static PyObject *__pyx_pf_6pandas_5tslib_48_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_transitions", 0);

  /* "pandas/tslib.pyx":1792
 *     Get UTC times of DST transitions
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         # tzoffset not hashable in Python 3
 *         hash(tz)
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/tslib.pyx":1794
 *     try:
 *         # tzoffset not hashable in Python 3
 *         hash(tz)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         return np.array([NPY_NAT + 1], dtype=np.int64)
 */
      __pyx_t_4 = PyObject_Hash(__pyx_v_tz); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;

    /* "pandas/tslib.pyx":1795
 *         # tzoffset not hashable in Python 3
 *         hash(tz)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         return np.array([NPY_NAT + 1], dtype=np.int64)
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pandas.tslib._get_transitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pandas/tslib.pyx":1796
 *         hash(tz)
 *     except TypeError:
 *         return np.array([NPY_NAT + 1], dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     if tz not in trans_cache:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_11));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
      __pyx_t_11 = 0;
      __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_11));
      __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_r = __pyx_t_13;
      __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/tslib.pyx":1798
 *         return np.array([NPY_NAT + 1], dtype=np.int64)
 * 
 *     if tz not in trans_cache:             # <<<<<<<<<<<<<<
 *         if hasattr(tz, '_utc_transition_times'):
 *             arr = np.array(tz._utc_transition_times, dtype='M8[ns]')
 */
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__trans_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_tz, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_14) {

    /* "pandas/tslib.pyx":1799
 * 
 *     if tz not in trans_cache:
 *         if hasattr(tz, '_utc_transition_times'):             # <<<<<<<<<<<<<<
 *             arr = np.array(tz._utc_transition_times, dtype='M8[ns]')
 *             arr = arr.view('i8')
 */
    __pyx_t_8 = ((PyObject *)__pyx_n_s_101);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_14 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_8); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_14) {

      /* "pandas/tslib.pyx":1800
 *     if tz not in trans_cache:
 *         if hasattr(tz, '_utc_transition_times'):
 *             arr = np.array(tz._utc_transition_times, dtype='M8[ns]')             # <<<<<<<<<<<<<<
 *             arr = arr.view('i8')
 *             try:
 */
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s_101); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __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);
      __pyx_t_8 = 0;
      __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_v_arr = __pyx_t_13;
      __pyx_t_13 = 0;

      /* "pandas/tslib.pyx":1801
 *         if hasattr(tz, '_utc_transition_times'):
 *             arr = np.array(tz._utc_transition_times, dtype='M8[ns]')
 *             arr = arr.view('i8')             # <<<<<<<<<<<<<<
 *             try:
 *                 if tz._utc_transition_times[0].year == 1:
 */
      __pyx_t_13 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__view); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_8 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_v_arr);
      __pyx_v_arr = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pandas/tslib.pyx":1802
 *             arr = np.array(tz._utc_transition_times, dtype='M8[ns]')
 *             arr = arr.view('i8')
 *             try:             # <<<<<<<<<<<<<<
 *                 if tz._utc_transition_times[0].year == 1:
 *                     arr[0] = NPY_NAT + 1
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_1);
        /*try:*/ {

          /* "pandas/tslib.pyx":1803
 *             arr = arr.view('i8')
 *             try:
 *                 if tz._utc_transition_times[0].year == 1:             # <<<<<<<<<<<<<<
 *                     arr[0] = NPY_NAT + 1
 *             except Exception:
 */
          __pyx_t_8 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s_101); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__year); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_14) {

            /* "pandas/tslib.pyx":1804
 *             try:
 *                 if tz._utc_transition_times[0].year == 1:
 *                     arr[0] = NPY_NAT + 1             # <<<<<<<<<<<<<<
 *             except Exception:
 *                 pass
 */
            __pyx_t_13 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_GOTREF(__pyx_t_13);
            if (__Pyx_SetItemInt(__pyx_v_arr, 0, __pyx_t_13, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L23;
          }
          __pyx_L23:;
        }
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L22_try_end;
        __pyx_L15_error:;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "pandas/tslib.pyx":1805
 *                 if tz._utc_transition_times[0].year == 1:
 *                     arr[0] = NPY_NAT + 1
 *             except Exception:             # <<<<<<<<<<<<<<
 *                 pass
 *         else:
 */
        __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
        if (__pyx_t_5) {
          PyErr_Restore(0,0,0);
          goto __pyx_L16_exception_handled;
        }
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
        goto __pyx_L1_error;
        __pyx_L16_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
        __pyx_L22_try_end:;
      }
      goto __pyx_L14;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1808
 *                 pass
 *         else:
 *             arr = np.array([NPY_NAT + 1], dtype=np.int64)             # <<<<<<<<<<<<<<
 *         trans_cache[tz] = arr
 *     return trans_cache[tz]
 */
      __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_6pandas_5tslib_NPY_NAT + 1)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      __pyx_t_13 = 0;
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_6));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
      __pyx_t_6 = 0;
      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_13), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_v_arr = __pyx_t_11;
      __pyx_t_11 = 0;
    }
    __pyx_L14:;

    /* "pandas/tslib.pyx":1809
 *         else:
 *             arr = np.array([NPY_NAT + 1], dtype=np.int64)
 *         trans_cache[tz] = arr             # <<<<<<<<<<<<<<
 *     return trans_cache[tz]
 * 
 */
    __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__trans_cache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    if (PyObject_SetItem(__pyx_t_11, __pyx_v_tz, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "pandas/tslib.pyx":1810
 *             arr = np.array([NPY_NAT + 1], dtype=np.int64)
 *         trans_cache[tz] = arr
 *     return trans_cache[tz]             # <<<<<<<<<<<<<<
 * 
 * def _get_deltas(tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__trans_cache); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_11, __pyx_v_tz); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pandas.tslib._get_transitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_51_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static char __pyx_doc_6pandas_5tslib_50_get_deltas[] = "\n    Get UTC offsets in microseconds corresponding to DST transitions\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_51_get_deltas = {__Pyx_NAMESTR("_get_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_51_get_deltas, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_50_get_deltas)};
static PyObject *__pyx_pw_6pandas_5tslib_51_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_deltas (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_50_get_deltas(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1812
 *     return trans_cache[tz]
 * 
 * def _get_deltas(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC offsets in microseconds corresponding to DST transitions
 */

static PyObject *__pyx_pf_6pandas_5tslib_50_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_deltas", 0);

  /* "pandas/tslib.pyx":1816
 *     Get UTC offsets in microseconds corresponding to DST transitions
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         # tzoffset not hashable in Python 3
 *         hash(tz)
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/tslib.pyx":1818
 *     try:
 *         # tzoffset not hashable in Python 3
 *         hash(tz)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000
 */
      __pyx_t_4 = PyObject_Hash(__pyx_v_tz); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;

    /* "pandas/tslib.pyx":1819
 *         # tzoffset not hashable in Python 3
 *         hash(tz)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000
 *         return np.array([num], dtype=np.int64)
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("pandas.tslib._get_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pandas/tslib.pyx":1820
 *         hash(tz)
 *     except TypeError:
 *         num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000             # <<<<<<<<<<<<<<
 *         return np.array([num], dtype=np.int64)
 * 
 */
      __pyx_t_9 = Py_None;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_10 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, __pyx_t_9, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_Multiply(__pyx_t_9, __pyx_int_1000000000); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_num = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "pandas/tslib.pyx":1821
 *     except TypeError:
 *         num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000
 *         return np.array([num], dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     if tz not in utc_offset_cache:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_num);
      PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v_num);
      __Pyx_GIVEREF(__pyx_v_num);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
      __pyx_t_10 = 0;
      __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
      __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__int64); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_13;
      __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/tslib.pyx":1823
 *         return np.array([num], dtype=np.int64)
 * 
 *     if tz not in utc_offset_cache:             # <<<<<<<<<<<<<<
 *         if hasattr(tz, '_utc_transition_times'):
 *             utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info)
 */
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_tz, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_14) {

    /* "pandas/tslib.pyx":1824
 * 
 *     if tz not in utc_offset_cache:
 *         if hasattr(tz, '_utc_transition_times'):             # <<<<<<<<<<<<<<
 *             utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info)
 *         else:
 */
    __pyx_t_8 = ((PyObject *)__pyx_n_s_101);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_14 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_8); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_14) {

      /* "pandas/tslib.pyx":1825
 *     if tz not in utc_offset_cache:
 *         if hasattr(tz, '_utc_transition_times'):
 *             utc_offset_cache[tz] = _unbox_utcoffsets(tz._transition_info)             # <<<<<<<<<<<<<<
 *         else:
 *             # static tzinfo
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = ((PyObject *)__pyx_f_6pandas_5tslib__unbox_utcoffsets(__pyx_t_8, 0)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (PyObject_SetItem(__pyx_t_8, __pyx_v_tz, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1828
 *         else:
 *             # static tzinfo
 *             num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000             # <<<<<<<<<<<<<<
 *             utc_offset_cache[tz] = np.array([num], dtype=np.int64)
 * 
 */
      __pyx_t_7 = Py_None;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, __pyx_t_7, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __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 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_Multiply(__pyx_t_7, __pyx_int_1000000000); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_num = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pandas/tslib.pyx":1829
 *             # static tzinfo
 *             num = int(total_seconds(_get_utcoffset(tz, None))) * 1000000000
 *             utc_offset_cache[tz] = np.array([num], dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     return utc_offset_cache[tz]
 */
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_num);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_num);
      __Pyx_GIVEREF(__pyx_v_num);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (PyObject_SetItem(__pyx_t_8, __pyx_v_tz, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_L14:;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "pandas/tslib.pyx":1831
 *             utc_offset_cache[tz] = np.array([num], dtype=np.int64)
 * 
 *     return utc_offset_cache[tz]             # <<<<<<<<<<<<<<
 * 
 * cdef double total_seconds(object td): # Python 2.6 compat
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__utc_offset_cache); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyObject_GetItem(__pyx_t_10, __pyx_v_tz); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pandas.tslib._get_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1833
 *     return utc_offset_cache[tz]
 * 
 * cdef double total_seconds(object td): # Python 2.6 compat             # <<<<<<<<<<<<<<
 *     return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) //
 *             10**6)
 */

static double __pyx_f_6pandas_5tslib_total_seconds(PyObject *__pyx_v_td) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("total_seconds", 0);

  /* "pandas/tslib.pyx":1834
 * 
 * cdef double total_seconds(object td): # Python 2.6 compat
 *     return ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) //             # <<<<<<<<<<<<<<
 *             10**6)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_td, __pyx_n_s__microseconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_td, __pyx_n_s__seconds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_td, __pyx_n_s__days); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_int_24); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_3600); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __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_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_1000000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __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_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_4, __pyx_int_1000000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_53tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_53tot_seconds = {__Pyx_NAMESTR("tot_seconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_53tot_seconds, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_53tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tot_seconds (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_52tot_seconds(__pyx_self, ((PyObject *)__pyx_v_td));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1837
 *             10**6)
 * 
 * def tot_seconds(td):             # <<<<<<<<<<<<<<
 *     return total_seconds(td)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_52tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tot_seconds", 0);

  /* "pandas/tslib.pyx":1838
 * 
 * def tot_seconds(td):
 *     return total_seconds(td)             # <<<<<<<<<<<<<<
 * 
 * cpdef ndarray _unbox_utcoffsets(object transinfo):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_v_td)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":1840
 *     return total_seconds(td)
 * 
 * cpdef ndarray _unbox_utcoffsets(object transinfo):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/
static PyArrayObject *__pyx_f_6pandas_5tslib__unbox_utcoffsets(PyObject *__pyx_v_transinfo, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyArrayObject *__pyx_v_arr = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  __pyx_t_5numpy_int64_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unbox_utcoffsets", 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/tslib.pyx":1845
 *         ndarray[int64_t] arr
 * 
 *     sz = len(transinfo)             # <<<<<<<<<<<<<<
 *     arr = np.empty(sz, dtype='i8')
 * 
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_transinfo); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_sz = __pyx_t_1;

  /* "pandas/tslib.pyx":1846
 * 
 *     sz = len(transinfo)
 *     arr = np.empty(sz, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(sz):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __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_sz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_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[0]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":1848
 *     arr = np.empty(sz, dtype='i8')
 * 
 *     for i in range(sz):             # <<<<<<<<<<<<<<
 *         arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000
 * 
 */
  __pyx_t_1 = __pyx_v_sz;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/tslib.pyx":1849
 * 
 *     for i in range(sz):
 *         arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000             # <<<<<<<<<<<<<<
 * 
 *     return arr
 */
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_transinfo, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_5, __pyx_int_1000000000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_2); if (unlikely((__pyx_t_12 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __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[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides) = __pyx_t_12;
  }

  /* "pandas/tslib.pyx":1851
 *         arr[i] = int(total_seconds(transinfo[i][0])) * 1000000000
 * 
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
  __pyx_r = ((PyArrayObject *)__pyx_v_arr);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unbox_utcoffsets (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(__pyx_self, ((PyObject *)__pyx_v_transinfo));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1840
 *     return total_seconds(td)
 * 
 * cpdef ndarray _unbox_utcoffsets(object transinfo):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pf_6pandas_5tslib_54_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unbox_utcoffsets", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5tslib__unbox_utcoffsets(__pyx_v_transinfo, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_57tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_56tz_localize_to_utc[] = "\n    Localize tzinfo-naive DateRange to given time zone (using pytz). If\n    there are ambiguities in the values, raise AmbiguousTimeError.\n\n    Returns\n    -------\n    localized : DatetimeIndex\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_57tz_localize_to_utc = {__Pyx_NAMESTR("tz_localize_to_utc"), (PyCFunction)__pyx_pw_6pandas_5tslib_57tz_localize_to_utc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_56tz_localize_to_utc)};
static PyObject *__pyx_pw_6pandas_5tslib_57tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_vals = 0;
  PyObject *__pyx_v_tz = 0;
  int __pyx_v_infer_dst;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_localize_to_utc (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vals,&__pyx_n_s__tz,&__pyx_n_s__infer_dst,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__vals)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tz_localize_to_utc", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infer_dst);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tz_localize_to_utc") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __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_vals = ((PyArrayObject *)values[0]);
    __pyx_v_tz = values[1];
    if (values[2]) {
      __pyx_v_infer_dst = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_infer_dst == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "pandas/tslib.pyx":1856
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False):             # <<<<<<<<<<<<<<
 *     """
 *     Localize tzinfo-naive DateRange to given time zone (using pytz). If
 */
      __pyx_v_infer_dst = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_localize_to_utc", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.tz_localize_to_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vals), __pyx_ptype_5numpy_ndarray, 1, "vals", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_56tz_localize_to_utc(__pyx_self, __pyx_v_vals, __pyx_v_tz, __pyx_v_infer_dst);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_56tz_localize_to_utc(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_vals, PyObject *__pyx_v_tz, int __pyx_v_infer_dst) {
  PyArrayObject *__pyx_v_trans = 0;
  PyArrayObject *__pyx_v_deltas = 0;
  PyArrayObject *__pyx_v_idx_shifted = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_pos;
  Py_ssize_t __pyx_v_ntrans;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int64_t *__pyx_v_tdata;
  __pyx_t_5numpy_int64_t __pyx_v_v;
  __pyx_t_5numpy_int64_t __pyx_v_left;
  __pyx_t_5numpy_int64_t __pyx_v_right;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_result_a = 0;
  PyArrayObject *__pyx_v_result_b = 0;
  PyArrayObject *__pyx_v_dst_hours = 0;
  pandas_datetimestruct __pyx_v_dts;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_v_both_nat = NULL;
  PyObject *__pyx_v_both_eq = NULL;
  PyObject *__pyx_v_trans_idx = NULL;
  PyObject *__pyx_v_stamp = NULL;
  PyObject *__pyx_v_one_diff = NULL;
  PyObject *__pyx_v_trans_grp = NULL;
  PyObject *__pyx_v_grp = NULL;
  PyObject *__pyx_v_switch_idx = NULL;
  PyObject *__pyx_v_a_idx = NULL;
  PyObject *__pyx_v_b_idx = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas;
  __Pyx_Buffer __pyx_pybuffer_deltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dst_hours;
  __Pyx_Buffer __pyx_pybuffer_dst_hours;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_idx_shifted;
  __Pyx_Buffer __pyx_pybuffer_idx_shifted;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result_a;
  __Pyx_Buffer __pyx_pybuffer_result_a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result_b;
  __Pyx_Buffer __pyx_pybuffer_result_b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_trans;
  __Pyx_Buffer __pyx_pybuffer_trans;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vals;
  __Pyx_Buffer __pyx_pybuffer_vals;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyArrayObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  __pyx_t_5numpy_int64_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyArrayObject *__pyx_t_22 = NULL;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  __pyx_t_5numpy_int64_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  PyObject *(*__pyx_t_34)(PyObject *);
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  Py_ssize_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  Py_ssize_t __pyx_t_43;
  Py_ssize_t __pyx_t_44;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_localize_to_utc", 0);
  __pyx_pybuffer_trans.pybuffer.buf = NULL;
  __pyx_pybuffer_trans.refcount = 0;
  __pyx_pybuffernd_trans.data = NULL;
  __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans;
  __pyx_pybuffer_deltas.pybuffer.buf = NULL;
  __pyx_pybuffer_deltas.refcount = 0;
  __pyx_pybuffernd_deltas.data = NULL;
  __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas;
  __pyx_pybuffer_idx_shifted.pybuffer.buf = NULL;
  __pyx_pybuffer_idx_shifted.refcount = 0;
  __pyx_pybuffernd_idx_shifted.data = NULL;
  __pyx_pybuffernd_idx_shifted.rcbuffer = &__pyx_pybuffer_idx_shifted;
  __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_result_a.pybuffer.buf = NULL;
  __pyx_pybuffer_result_a.refcount = 0;
  __pyx_pybuffernd_result_a.data = NULL;
  __pyx_pybuffernd_result_a.rcbuffer = &__pyx_pybuffer_result_a;
  __pyx_pybuffer_result_b.pybuffer.buf = NULL;
  __pyx_pybuffer_result_b.refcount = 0;
  __pyx_pybuffernd_result_b.data = NULL;
  __pyx_pybuffernd_result_b.rcbuffer = &__pyx_pybuffer_result_b;
  __pyx_pybuffer_dst_hours.pybuffer.buf = NULL;
  __pyx_pybuffer_dst_hours.refcount = 0;
  __pyx_pybuffernd_dst_hours.data = NULL;
  __pyx_pybuffernd_dst_hours.rcbuffer = &__pyx_pybuffer_dst_hours;
  __pyx_pybuffer_vals.pybuffer.buf = NULL;
  __pyx_pybuffer_vals.refcount = 0;
  __pyx_pybuffernd_vals.data = NULL;
  __pyx_pybuffernd_vals.rcbuffer = &__pyx_pybuffer_vals;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vals.rcbuffer->pybuffer, (PyObject*)__pyx_v_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_vals.diminfo[0].strides = __pyx_pybuffernd_vals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vals.diminfo[0].shape = __pyx_pybuffernd_vals.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":1867
 *     cdef:
 *         ndarray[int64_t] trans, deltas, idx_shifted
 *         Py_ssize_t i, idx, pos, ntrans, n = len(vals)             # <<<<<<<<<<<<<<
 *         int64_t *tdata
 *         int64_t v, left, right
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_vals)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1875
 *     # Vectorized version of DstTzInfo.localize
 * 
 *     if not have_pytz:             # <<<<<<<<<<<<<<
 *         raise Exception("Could not find pytz module")
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__have_pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1876
 * 
 *     if not have_pytz:
 *         raise Exception("Could not find pytz module")             # <<<<<<<<<<<<<<
 * 
 *     if tz == UTC or tz is None:
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1878
 *         raise Exception("Could not find pytz module")
 * 
 *     if tz == UTC or tz is None:             # <<<<<<<<<<<<<<
 *         return vals
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UTC); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_tz, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!__pyx_t_4) {
    __pyx_t_3 = (__pyx_v_tz == Py_None);
    __pyx_t_6 = __pyx_t_3;
  } else {
    __pyx_t_6 = __pyx_t_4;
  }
  if (__pyx_t_6) {

    /* "pandas/tslib.pyx":1879
 * 
 *     if tz == UTC or tz is None:
 *         return vals             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=np.int64)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_vals));
    __pyx_r = ((PyObject *)__pyx_v_vals);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1881
 *         return vals
 * 
 *     result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     if _is_tzlocal(tz):
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 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[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, 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_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_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_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_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_10 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "pandas/tslib.pyx":1883
 *     result = np.empty(n, dtype=np.int64)
 * 
 *     if _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             v = vals[i]
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_6) {

    /* "pandas/tslib.pyx":1884
 * 
 *     if _is_tzlocal(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             v = vals[i]
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) {
      __pyx_v_i = __pyx_t_15;

      /* "pandas/tslib.pyx":1885
 *     if _is_tzlocal(tz):
 *         for i in range(n):
 *             v = vals[i]             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_v_v = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_vals.diminfo[0].strides));

      /* "pandas/tslib.pyx":1886
 *         for i in range(n):
 *             v = vals[i]
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 */
      pandas_datetime_to_datetimestruct(__pyx_v_v, PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":1887
 *             v = vals[i]
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 */
      __pyx_t_7 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);

      /* "pandas/tslib.pyx":1888
 *             pandas_datetime_to_datetimestruct(v, PANDAS_FR_ns, &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             result[i] = v - delta
 */
      __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_17 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = PyTuple_New(8); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_19, 5, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_19, 6, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_18);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_19, 7, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_7 = 0;
      __pyx_t_5 = 0;
      __pyx_t_9 = 0;
      __pyx_t_2 = 0;
      __pyx_t_8 = 0;
      __pyx_t_17 = 0;
      __pyx_t_18 = 0;
      __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
      __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_18);
      __pyx_t_18 = 0;

      /* "pandas/tslib.pyx":1889
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *             result[i] = v - delta
 *         return result
 */
      __pyx_t_18 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_18)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_19);
      __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
      __pyx_t_18 = PyNumber_Multiply(__pyx_t_19, __pyx_int_1000000000); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_v_delta);
      __pyx_v_delta = __pyx_t_18;
      __pyx_t_18 = 0;

      /* "pandas/tslib.pyx":1890
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             result[i] = v - delta             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_v); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_v_delta); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_19); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_21 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_20;
    }

    /* "pandas/tslib.pyx":1891
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             result[i] = v - delta
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     trans = _get_transitions(tz)  # transition dates
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":1893
 *         return result
 * 
 *     trans = _get_transitions(tz)  # transition dates             # <<<<<<<<<<<<<<
 *     deltas = _get_deltas(tz)      # utc offsets
 * 
 */
  __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
  if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_22 = ((PyArrayObject *)__pyx_t_17);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_22 = 0;
  __pyx_v_trans = ((PyArrayObject *)__pyx_t_17);
  __pyx_t_17 = 0;

  /* "pandas/tslib.pyx":1894
 * 
 *     trans = _get_transitions(tz)  # transition dates
 *     deltas = _get_deltas(tz)      # utc offsets             # <<<<<<<<<<<<<<
 * 
 *     tdata = <int64_t*> trans.data
 */
  __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
  if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_22 = ((PyArrayObject *)__pyx_t_19);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_22 = 0;
  __pyx_v_deltas = ((PyArrayObject *)__pyx_t_19);
  __pyx_t_19 = 0;

  /* "pandas/tslib.pyx":1896
 *     deltas = _get_deltas(tz)      # utc offsets
 * 
 *     tdata = <int64_t*> trans.data             # <<<<<<<<<<<<<<
 *     ntrans = len(trans)
 * 
 */
  __pyx_v_tdata = ((__pyx_t_5numpy_int64_t *)__pyx_v_trans->data);

  /* "pandas/tslib.pyx":1897
 * 
 *     tdata = <int64_t*> trans.data
 *     ntrans = len(trans)             # <<<<<<<<<<<<<<
 * 
 *     result_a = np.empty(n, dtype=np.int64)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_trans)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ntrans = __pyx_t_1;

  /* "pandas/tslib.pyx":1899
 *     ntrans = len(trans)
 * 
 *     result_a = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     result_b = np.empty(n, dtype=np.int64)
 *     result_a.fill(NPY_NAT)
 */
  __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__empty); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_19);
  __pyx_t_19 = 0;
  __pyx_t_19 = PyDict_New(); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_19));
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_19, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_17), ((PyObject *)__pyx_t_19)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_result_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_result_a.diminfo[0].strides = __pyx_pybuffernd_result_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result_a.diminfo[0].shape = __pyx_pybuffernd_result_a.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_10 = 0;
  __pyx_v_result_a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":1900
 * 
 *     result_a = np.empty(n, dtype=np.int64)
 *     result_b = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     result_a.fill(NPY_NAT)
 *     result_b.fill(NPY_NAT)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_19 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_18, __pyx_n_s__int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_17), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, 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_result_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_result_b, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, 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_result_b.diminfo[0].strides = __pyx_pybuffernd_result_b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result_b.diminfo[0].shape = __pyx_pybuffernd_result_b.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_10 = 0;
  __pyx_v_result_b = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/tslib.pyx":1901
 *     result_a = np.empty(n, dtype=np.int64)
 *     result_b = np.empty(n, dtype=np.int64)
 *     result_a.fill(NPY_NAT)             # <<<<<<<<<<<<<<
 *     result_b.fill(NPY_NAT)
 * 
 */
  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_result_a), __pyx_n_s__fill); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":1902
 *     result_b = np.empty(n, dtype=np.int64)
 *     result_a.fill(NPY_NAT)
 *     result_b.fill(NPY_NAT)             # <<<<<<<<<<<<<<
 * 
 *     # left side
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_result_b), __pyx_n_s__fill); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17);
  __Pyx_GIVEREF(__pyx_t_17);
  __pyx_t_17 = 0;
  __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "pandas/tslib.pyx":1906
 *     # left side
 *     idx_shifted = _ensure_int64(
 *         np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s__maximum); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_DAY_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_19 = PyNumber_Subtract(((PyObject *)__pyx_v_vals), __pyx_t_2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_19);
  __pyx_t_19 = 0;
  __pyx_t_19 = PyDict_New(); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_19));
  if (PyDict_SetItem(__pyx_t_19, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_19)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
  __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_19);
  __pyx_t_19 = 0;
  __pyx_t_19 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
  __pyx_t_18 = __pyx_f_6pandas_5tslib__ensure_int64(__pyx_t_19); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_22 = ((PyArrayObject *)__pyx_t_18);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_shifted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_idx_shifted.diminfo[0].strides = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_shifted.diminfo[0].shape = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_22 = 0;
  __pyx_v_idx_shifted = ((PyArrayObject *)__pyx_t_18);
  __pyx_t_18 = 0;

  /* "pandas/tslib.pyx":1908
 *         np.maximum(0, trans.searchsorted(vals - DAY_NS, side='right') - 1))
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = vals[i] - deltas[idx_shifted[i]]
 *         pos = bisect_right_i8(tdata, v, ntrans) - 1
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "pandas/tslib.pyx":1909
 * 
 *     for i in range(n):
 *         v = vals[i] - deltas[idx_shifted[i]]             # <<<<<<<<<<<<<<
 *         pos = bisect_right_i8(tdata, v, ntrans) - 1
 * 
 */
    __pyx_t_23 = __pyx_v_i;
    __pyx_t_24 = __pyx_v_i;
    __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_idx_shifted.diminfo[0].strides));
    __pyx_v_v = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_vals.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_deltas.diminfo[0].strides)));

    /* "pandas/tslib.pyx":1910
 *     for i in range(n):
 *         v = vals[i] - deltas[idx_shifted[i]]
 *         pos = bisect_right_i8(tdata, v, ntrans) - 1             # <<<<<<<<<<<<<<
 * 
 *         # timestamp falls to the left side of the DST transition
 */
    __pyx_t_18 = __pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_v_tdata, __pyx_v_v, __pyx_v_ntrans); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_19 = PyNumber_Subtract(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __pyx_t_25 = __Pyx_PyIndex_AsSsize_t(__pyx_t_19); if (unlikely((__pyx_t_25 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_v_pos = __pyx_t_25;

    /* "pandas/tslib.pyx":1913
 * 
 *         # timestamp falls to the left side of the DST transition
 *         if v + deltas[pos] == vals[i]:             # <<<<<<<<<<<<<<
 *             result_a[i] = v
 * 
 */
    __pyx_t_25 = __pyx_v_pos;
    __pyx_t_26 = __pyx_v_i;
    __pyx_t_6 = ((__pyx_v_v + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_deltas.diminfo[0].strides))) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_vals.diminfo[0].strides)));
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":1914
 *         # timestamp falls to the left side of the DST transition
 *         if v + deltas[pos] == vals[i]:
 *             result_a[i] = v             # <<<<<<<<<<<<<<
 * 
 *     # right side
 */
      __pyx_t_27 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_a.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_result_a.diminfo[0].strides) = __pyx_v_v;
      goto __pyx_L10;
    }
    __pyx_L10:;
  }

  /* "pandas/tslib.pyx":1918
 *     # right side
 *     idx_shifted = _ensure_int64(
 *         np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__maximum); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_8 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_DAY_NS); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_vals), __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
  __pyx_t_17 = __pyx_f_6pandas_5tslib__ensure_int64(__pyx_t_2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_22 = ((PyArrayObject *)__pyx_t_17);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_idx_shifted.rcbuffer->pybuffer, (PyObject*)__pyx_v_idx_shifted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 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_idx_shifted.diminfo[0].strides = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx_shifted.diminfo[0].shape = __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_22 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_idx_shifted));
  __pyx_v_idx_shifted = ((PyArrayObject *)__pyx_t_17);
  __pyx_t_17 = 0;

  /* "pandas/tslib.pyx":1920
 *         np.maximum(0, trans.searchsorted(vals + DAY_NS, side='right') - 1))
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = vals[i] - deltas[idx_shifted[i]]
 *         pos = bisect_right_i8(tdata, v, ntrans) - 1
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "pandas/tslib.pyx":1921
 * 
 *     for i in range(n):
 *         v = vals[i] - deltas[idx_shifted[i]]             # <<<<<<<<<<<<<<
 *         pos = bisect_right_i8(tdata, v, ntrans) - 1
 * 
 */
    __pyx_t_28 = __pyx_v_i;
    __pyx_t_29 = __pyx_v_i;
    __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_idx_shifted.diminfo[0].strides));
    __pyx_v_v = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_vals.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_deltas.diminfo[0].strides)));

    /* "pandas/tslib.pyx":1922
 *     for i in range(n):
 *         v = vals[i] - deltas[idx_shifted[i]]
 *         pos = bisect_right_i8(tdata, v, ntrans) - 1             # <<<<<<<<<<<<<<
 * 
 *         # timestamp falls to the right side of the DST transition
 */
    __pyx_t_17 = __pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_v_tdata, __pyx_v_v, __pyx_v_ntrans); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_2 = PyNumber_Subtract(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_31 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_31 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_pos = __pyx_t_31;

    /* "pandas/tslib.pyx":1925
 * 
 *         # timestamp falls to the right side of the DST transition
 *         if v + deltas[pos] == vals[i]:             # <<<<<<<<<<<<<<
 *             result_b[i] = v
 * 
 */
    __pyx_t_31 = __pyx_v_pos;
    __pyx_t_32 = __pyx_v_i;
    __pyx_t_6 = ((__pyx_v_v + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_deltas.diminfo[0].strides))) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_vals.diminfo[0].strides)));
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":1926
 *         # timestamp falls to the right side of the DST transition
 *         if v + deltas[pos] == vals[i]:
 *             result_b[i] = v             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_33 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_b.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result_b.diminfo[0].strides) = __pyx_v_v;
      goto __pyx_L13;
    }
    __pyx_L13:;
  }

  /* "pandas/tslib.pyx":1929
 * 
 * 
 *     if infer_dst:             # <<<<<<<<<<<<<<
 *         dst_hours = np.empty(n, dtype=np.int64)
 *         dst_hours.fill(NPY_NAT)
 */
  if (__pyx_v_infer_dst) {

    /* "pandas/tslib.pyx":1930
 * 
 *     if infer_dst:
 *         dst_hours = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         dst_hours.fill(NPY_NAT)
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_19 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_19);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_dst_hours, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        }
      }
      __pyx_pybuffernd_dst_hours.diminfo[0].strides = __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dst_hours.diminfo[0].shape = __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_10 = 0;
    __pyx_v_dst_hours = ((PyArrayObject *)__pyx_t_19);
    __pyx_t_19 = 0;

    /* "pandas/tslib.pyx":1931
 *     if infer_dst:
 *         dst_hours = np.empty(n, dtype=np.int64)
 *         dst_hours.fill(NPY_NAT)             # <<<<<<<<<<<<<<
 * 
 *         # Get the ambiguous hours (given the above, these are the hours
 */
    __pyx_t_19 = PyObject_GetAttr(((PyObject *)__pyx_v_dst_hours), __pyx_n_s__fill); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":1935
 *         # Get the ambiguous hours (given the above, these are the hours
 *         # where result_a != result_b and neither of them are NAT)
 *         both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT)             # <<<<<<<<<<<<<<
 *         both_eq  = result_a == result_b
 *         trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq)))
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__logical_and); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = PyObject_RichCompare(((PyObject *)__pyx_v_result_a), __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17 = PyObject_RichCompare(((PyObject *)__pyx_v_result_b), __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    __pyx_t_19 = 0;
    __pyx_t_17 = 0;
    __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_both_nat = __pyx_t_17;
    __pyx_t_17 = 0;

    /* "pandas/tslib.pyx":1936
 *         # where result_a != result_b and neither of them are NAT)
 *         both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT)
 *         both_eq  = result_a == result_b             # <<<<<<<<<<<<<<
 *         trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq)))
 *         if trans_idx.size == 1:
 */
    __pyx_t_17 = PyObject_RichCompare(((PyObject *)__pyx_v_result_a), ((PyObject *)__pyx_v_result_b), Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_both_eq = __pyx_t_17;
    __pyx_t_17 = 0;

    /* "pandas/tslib.pyx":1937
 *         both_nat = np.logical_and(result_a != NPY_NAT, result_b != NPY_NAT)
 *         both_eq  = result_a == result_b
 *         trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq)))             # <<<<<<<<<<<<<<
 *         if trans_idx.size == 1:
 *             stamp = Timestamp(vals[trans_idx])
 */
    __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s__squeeze); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_18 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_19 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s__logical_and); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyNumber_Invert(__pyx_v_both_eq); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_both_nat);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_both_nat);
    __Pyx_GIVEREF(__pyx_v_both_nat);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_v_trans_idx = __pyx_t_17;
    __pyx_t_17 = 0;

    /* "pandas/tslib.pyx":1938
 *         both_eq  = result_a == result_b
 *         trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq)))
 *         if trans_idx.size == 1:             # <<<<<<<<<<<<<<
 *             stamp = Timestamp(vals[trans_idx])
 *             raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as"
 */
    __pyx_t_17 = PyObject_GetAttr(__pyx_v_trans_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_17, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":1939
 *         trans_idx = np.squeeze(np.nonzero(np.logical_and(both_nat, ~both_eq)))
 *         if trans_idx.size == 1:
 *             stamp = Timestamp(vals[trans_idx])             # <<<<<<<<<<<<<<
 *             raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as"
 *                                           "there are no repeated times" % stamp)
 */
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_17 = PyObject_GetItem(((PyObject *)__pyx_v_vals), __pyx_v_trans_idx); if (!__pyx_t_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_v_stamp = __pyx_t_17;
      __pyx_t_17 = 0;

      /* "pandas/tslib.pyx":1940
 *         if trans_idx.size == 1:
 *             stamp = Timestamp(vals[trans_idx])
 *             raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as"             # <<<<<<<<<<<<<<
 *                                           "there are no repeated times" % stamp)
 *         # Split the array into contiguous chunks (where the difference between
 */
      __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

      /* "pandas/tslib.pyx":1941
 *             stamp = Timestamp(vals[trans_idx])
 *             raise pytz.AmbiguousTimeError("Cannot infer dst time from %s as"
 *                                           "there are no repeated times" % stamp)             # <<<<<<<<<<<<<<
 *         # Split the array into contiguous chunks (where the difference between
 *         # indices is 1).  These are effectively dst transitions in different years
 */
      __pyx_t_17 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_105), __pyx_v_stamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_17));
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_17));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_17));
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_17, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "pandas/tslib.pyx":1946
 *         # which is useful for checking that there is not an ambiguous transition
 *         # in an individual year.
 *         if trans_idx.size > 0:             # <<<<<<<<<<<<<<
 *             one_diff = np.where(np.diff(trans_idx)!=1)[0]+1
 *             trans_grp = np.array_split(trans_idx, one_diff)
 */
    __pyx_t_17 = PyObject_GetAttr(__pyx_v_trans_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_17, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":1947
 *         # in an individual year.
 *         if trans_idx.size > 0:
 *             one_diff = np.where(np.diff(trans_idx)!=1)[0]+1             # <<<<<<<<<<<<<<
 *             trans_grp = np.array_split(trans_idx, one_diff)
 * 
 */
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_17 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__where); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__diff); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_trans_idx);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_trans_idx);
      __Pyx_GIVEREF(__pyx_v_trans_idx);
      __pyx_t_18 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_18, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
      __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_v_one_diff = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pandas/tslib.pyx":1948
 *         if trans_idx.size > 0:
 *             one_diff = np.where(np.diff(trans_idx)!=1)[0]+1
 *             trans_grp = np.array_split(trans_idx, one_diff)             # <<<<<<<<<<<<<<
 * 
 *             # Iterate through each day, if there are no hours where the delta is negative
 */
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_18 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__array_split); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_trans_idx);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_trans_idx);
      __Pyx_GIVEREF(__pyx_v_trans_idx);
      __Pyx_INCREF(__pyx_v_one_diff);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_one_diff);
      __Pyx_GIVEREF(__pyx_v_one_diff);
      __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_v_trans_grp = __pyx_t_17;
      __pyx_t_17 = 0;

      /* "pandas/tslib.pyx":1952
 *             # Iterate through each day, if there are no hours where the delta is negative
 *             # (indicates a repeat of hour) the switch cannot be inferred
 *             for grp in trans_grp:             # <<<<<<<<<<<<<<
 * 
 *                 delta = np.diff(result_a[grp])
 */
      if (PyList_CheckExact(__pyx_v_trans_grp) || PyTuple_CheckExact(__pyx_v_trans_grp)) {
        __pyx_t_17 = __pyx_v_trans_grp; __Pyx_INCREF(__pyx_t_17); __pyx_t_1 = 0;
        __pyx_t_34 = NULL;
      } else {
        __pyx_t_1 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_trans_grp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_34 = Py_TYPE(__pyx_t_17)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_34 && PyList_CheckExact(__pyx_t_17)) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_17)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_17, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_17, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_34 && PyTuple_CheckExact(__pyx_t_17)) {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_17)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_17, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_8 = __pyx_t_34(__pyx_t_17);
          if (unlikely(!__pyx_t_8)) {
            if (PyErr_Occurred()) {
              if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF(__pyx_v_grp);
        __pyx_v_grp = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "pandas/tslib.pyx":1954
 *             for grp in trans_grp:
 * 
 *                 delta = np.diff(result_a[grp])             # <<<<<<<<<<<<<<
 *                 if grp.size == 1 or np.all(delta>0):
 *                     stamp = Timestamp(vals[grp[0]])
 */
        __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_18 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__diff); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_result_a), __pyx_v_grp); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_delta);
        __pyx_v_delta = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "pandas/tslib.pyx":1955
 * 
 *                 delta = np.diff(result_a[grp])
 *                 if grp.size == 1 or np.all(delta>0):             # <<<<<<<<<<<<<<
 *                     stamp = Timestamp(vals[grp[0]])
 *                     raise pytz.AmbiguousTimeError(stamp)
 */
        __pyx_t_8 = PyObject_GetAttr(__pyx_v_grp, __pyx_n_s__size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!__pyx_t_6) {
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__all); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_3 = __pyx_t_4;
        } else {
          __pyx_t_3 = __pyx_t_6;
        }
        if (__pyx_t_3) {

          /* "pandas/tslib.pyx":1956
 *                 delta = np.diff(result_a[grp])
 *                 if grp.size == 1 or np.all(delta>0):
 *                     stamp = Timestamp(vals[grp[0]])             # <<<<<<<<<<<<<<
 *                     raise pytz.AmbiguousTimeError(stamp)
 * 
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_grp, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_vals), __pyx_t_18); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
          __pyx_v_stamp = __pyx_t_8;
          __pyx_t_8 = 0;

          /* "pandas/tslib.pyx":1957
 *                 if grp.size == 1 or np.all(delta>0):
 *                     stamp = Timestamp(vals[grp[0]])
 *                     raise pytz.AmbiguousTimeError(stamp)             # <<<<<<<<<<<<<<
 * 
 *                 # Find the index for the switch and pull from a for dst and b for standard
 */
          __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_18 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_stamp);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_stamp);
          __Pyx_GIVEREF(__pyx_v_stamp);
          __pyx_t_2 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L19;
        }
        __pyx_L19:;

        /* "pandas/tslib.pyx":1960
 * 
 *                 # Find the index for the switch and pull from a for dst and b for standard
 *                 switch_idx = (delta<=0).nonzero()[0]             # <<<<<<<<<<<<<<
 *                 if switch_idx.size > 1:
 *                     raise pytz.AmbiguousTimeError("There are %i dst switches "
 */
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_switch_idx);
        __pyx_v_switch_idx = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "pandas/tslib.pyx":1961
 *                 # Find the index for the switch and pull from a for dst and b for standard
 *                 switch_idx = (delta<=0).nonzero()[0]
 *                 if switch_idx.size > 1:             # <<<<<<<<<<<<<<
 *                     raise pytz.AmbiguousTimeError("There are %i dst switches "
 *                                                   "when there should only be 1."
 */
        __pyx_t_8 = PyObject_GetAttr(__pyx_v_switch_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_3) {

          /* "pandas/tslib.pyx":1962
 *                 switch_idx = (delta<=0).nonzero()[0]
 *                 if switch_idx.size > 1:
 *                     raise pytz.AmbiguousTimeError("There are %i dst switches "             # <<<<<<<<<<<<<<
 *                                                   "when there should only be 1."
 *                                                   % switch_idx.size)
 */
          __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pandas/tslib.pyx":1964
 *                     raise pytz.AmbiguousTimeError("There are %i dst switches "
 *                                                   "when there should only be 1."
 *                                                   % switch_idx.size)             # <<<<<<<<<<<<<<
 *                 switch_idx = switch_idx[0]+1 # Pull the only index and adjust
 *                 a_idx = grp[:switch_idx]
 */
          __pyx_t_2 = PyObject_GetAttr(__pyx_v_switch_idx, __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_106), __pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_18));
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_18));
          __Pyx_GIVEREF(((PyObject *)__pyx_t_18));
          __pyx_t_18 = 0;
          __pyx_t_18 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_18, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L20;
        }
        __pyx_L20:;

        /* "pandas/tslib.pyx":1965
 *                                                   "when there should only be 1."
 *                                                   % switch_idx.size)
 *                 switch_idx = switch_idx[0]+1 # Pull the only index and adjust             # <<<<<<<<<<<<<<
 *                 a_idx = grp[:switch_idx]
 *                 b_idx = grp[switch_idx:]
 */
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_switch_idx, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_2 = PyNumber_Add(__pyx_t_18, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_v_switch_idx);
        __pyx_v_switch_idx = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pandas/tslib.pyx":1966
 *                                                   % switch_idx.size)
 *                 switch_idx = switch_idx[0]+1 # Pull the only index and adjust
 *                 a_idx = grp[:switch_idx]             # <<<<<<<<<<<<<<
 *                 b_idx = grp[switch_idx:]
 *                 dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx]))
 */
        __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_switch_idx); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_grp, 0, __pyx_t_15); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF(__pyx_v_a_idx);
        __pyx_v_a_idx = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pandas/tslib.pyx":1967
 *                 switch_idx = switch_idx[0]+1 # Pull the only index and adjust
 *                 a_idx = grp[:switch_idx]
 *                 b_idx = grp[switch_idx:]             # <<<<<<<<<<<<<<
 *                 dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx]))
 * 
 */
        __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_switch_idx); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_grp, __pyx_t_15, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF(__pyx_v_b_idx);
        __pyx_v_b_idx = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "pandas/tslib.pyx":1968
 *                 a_idx = grp[:switch_idx]
 *                 b_idx = grp[switch_idx:]
 *                 dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx]))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_18 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__hstack); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_v_result_a), __pyx_v_a_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_v_result_b), __pyx_v_b_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_2 = 0;
        __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_19));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_19));
        __pyx_t_19 = 0;
        __pyx_t_19 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
        if (PyObject_SetItem(((PyObject *)__pyx_v_dst_hours), __pyx_v_grp, __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      goto __pyx_L16;
    }
    __pyx_L16:;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "pandas/tslib.pyx":1970
 *                 dst_hours[grp] = np.hstack((result_a[a_idx], result_b[b_idx]))
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         left = result_a[i]
 *         right = result_b[i]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_1; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "pandas/tslib.pyx":1971
 * 
 *     for i in range(n):
 *         left = result_a[i]             # <<<<<<<<<<<<<<
 *         right = result_b[i]
 *         if left != NPY_NAT and right != NPY_NAT:
 */
    __pyx_t_35 = __pyx_v_i;
    __pyx_v_left = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_a.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result_a.diminfo[0].strides));

    /* "pandas/tslib.pyx":1972
 *     for i in range(n):
 *         left = result_a[i]
 *         right = result_b[i]             # <<<<<<<<<<<<<<
 *         if left != NPY_NAT and right != NPY_NAT:
 *             if left == right:
 */
    __pyx_t_36 = __pyx_v_i;
    __pyx_v_right = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result_b.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result_b.diminfo[0].strides));

    /* "pandas/tslib.pyx":1973
 *         left = result_a[i]
 *         right = result_b[i]
 *         if left != NPY_NAT and right != NPY_NAT:             # <<<<<<<<<<<<<<
 *             if left == right:
 *                 result[i] = left
 */
    __pyx_t_3 = (__pyx_v_left != __pyx_v_6pandas_5tslib_NPY_NAT);
    if (__pyx_t_3) {
      __pyx_t_6 = (__pyx_v_right != __pyx_v_6pandas_5tslib_NPY_NAT);
      __pyx_t_4 = __pyx_t_6;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":1974
 *         right = result_b[i]
 *         if left != NPY_NAT and right != NPY_NAT:
 *             if left == right:             # <<<<<<<<<<<<<<
 *                 result[i] = left
 *             else:
 */
      __pyx_t_4 = (__pyx_v_left == __pyx_v_right);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":1975
 *         if left != NPY_NAT and right != NPY_NAT:
 *             if left == right:
 *                 result[i] = left             # <<<<<<<<<<<<<<
 *             else:
 *                 if infer_dst and dst_hours[i] != NPY_NAT:
 */
        __pyx_t_37 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left;
        goto __pyx_L24;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":1977
 *                 result[i] = left
 *             else:
 *                 if infer_dst and dst_hours[i] != NPY_NAT:             # <<<<<<<<<<<<<<
 *                     result[i] = dst_hours[i]
 *                 else:
 */
        if (__pyx_v_infer_dst) {
          __pyx_t_38 = __pyx_v_i;
          __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_dst_hours.diminfo[0].strides)) != __pyx_v_6pandas_5tslib_NPY_NAT);
          __pyx_t_3 = __pyx_t_4;
        } else {
          __pyx_t_3 = __pyx_v_infer_dst;
        }
        if (__pyx_t_3) {

          /* "pandas/tslib.pyx":1978
 *             else:
 *                 if infer_dst and dst_hours[i] != NPY_NAT:
 *                     result[i] = dst_hours[i]             # <<<<<<<<<<<<<<
 *                 else:
 *                     stamp = Timestamp(vals[i])
 */
          __pyx_t_39 = __pyx_v_i;
          __pyx_t_40 = __pyx_v_i;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_dst_hours.diminfo[0].strides));
          goto __pyx_L25;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1980
 *                     result[i] = dst_hours[i]
 *                 else:
 *                     stamp = Timestamp(vals[i])             # <<<<<<<<<<<<<<
 *                     raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\
 *                                                   "try using the 'infer_dst' argument"
 */
          __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_41 = __pyx_v_i;
          __pyx_t_19 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_19);
          __Pyx_GIVEREF(__pyx_t_19);
          __pyx_t_19 = 0;
          __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
          __pyx_v_stamp = __pyx_t_19;
          __pyx_t_19 = 0;

          /* "pandas/tslib.pyx":1981
 *                 else:
 *                     stamp = Timestamp(vals[i])
 *                     raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\             # <<<<<<<<<<<<<<
 *                                                   "try using the 'infer_dst' argument"
 *                                                   % stamp)
 */
          __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_19);
          __pyx_t_8 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__AmbiguousTimeError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

          /* "pandas/tslib.pyx":1983
 *                     raise pytz.AmbiguousTimeError("Cannot infer dst time from %r, "\
 *                                                   "try using the 'infer_dst' argument"
 *                                                   % stamp)             # <<<<<<<<<<<<<<
 *         elif left != NPY_NAT:
 *             result[i] = left
 */
          __pyx_t_19 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_107), __pyx_v_stamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_19));
          __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          PyTuple_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_t_19));
          __Pyx_GIVEREF(((PyObject *)__pyx_t_19));
          __pyx_t_19 = 0;
          __pyx_t_19 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
          __Pyx_Raise(__pyx_t_19, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_L25:;
      }
      __pyx_L24:;
      goto __pyx_L23;
    }

    /* "pandas/tslib.pyx":1984
 *                                                   "try using the 'infer_dst' argument"
 *                                                   % stamp)
 *         elif left != NPY_NAT:             # <<<<<<<<<<<<<<
 *             result[i] = left
 *         elif right != NPY_NAT:
 */
    __pyx_t_3 = (__pyx_v_left != __pyx_v_6pandas_5tslib_NPY_NAT);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":1985
 *                                                   % stamp)
 *         elif left != NPY_NAT:
 *             result[i] = left             # <<<<<<<<<<<<<<
 *         elif right != NPY_NAT:
 *             result[i] = right
 */
      __pyx_t_42 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left;
      goto __pyx_L23;
    }

    /* "pandas/tslib.pyx":1986
 *         elif left != NPY_NAT:
 *             result[i] = left
 *         elif right != NPY_NAT:             # <<<<<<<<<<<<<<
 *             result[i] = right
 *         else:
 */
    __pyx_t_3 = (__pyx_v_right != __pyx_v_6pandas_5tslib_NPY_NAT);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":1987
 *             result[i] = left
 *         elif right != NPY_NAT:
 *             result[i] = right             # <<<<<<<<<<<<<<
 *         else:
 *             stamp = Timestamp(vals[i])
 */
      __pyx_t_43 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_right;
      goto __pyx_L23;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1989
 *             result[i] = right
 *         else:
 *             stamp = Timestamp(vals[i])             # <<<<<<<<<<<<<<
 *             raise pytz.NonExistentTimeError(stamp)
 * 
 */
      __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_44 = __pyx_v_i;
      __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_v_stamp = __pyx_t_17;
      __pyx_t_17 = 0;

      /* "pandas/tslib.pyx":1990
 *         else:
 *             stamp = Timestamp(vals[i])
 *             raise pytz.NonExistentTimeError(stamp)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s_108); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_INCREF(__pyx_v_stamp);
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_stamp);
      __Pyx_GIVEREF(__pyx_v_stamp);
      __pyx_t_19 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      __Pyx_Raise(__pyx_t_19, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L23:;
  }

  /* "pandas/tslib.pyx":1992
 *             raise pytz.NonExistentTimeError(stamp)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef _ensure_int64(object arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.tz_localize_to_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dst_hours.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_idx_shifted.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result_b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vals.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_trans);
  __Pyx_XDECREF((PyObject *)__pyx_v_deltas);
  __Pyx_XDECREF((PyObject *)__pyx_v_idx_shifted);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_result_a);
  __Pyx_XDECREF((PyObject *)__pyx_v_result_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_dst_hours);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v_both_nat);
  __Pyx_XDECREF(__pyx_v_both_eq);
  __Pyx_XDECREF(__pyx_v_trans_idx);
  __Pyx_XDECREF(__pyx_v_stamp);
  __Pyx_XDECREF(__pyx_v_one_diff);
  __Pyx_XDECREF(__pyx_v_trans_grp);
  __Pyx_XDECREF(__pyx_v_grp);
  __Pyx_XDECREF(__pyx_v_switch_idx);
  __Pyx_XDECREF(__pyx_v_a_idx);
  __Pyx_XDECREF(__pyx_v_b_idx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1994
 *     return result
 * 
 * cdef _ensure_int64(object arr):             # <<<<<<<<<<<<<<
 *     if util.is_array(arr):
 *         if (<ndarray> arr).descr.type_num == NPY_INT64:
 */

static PyObject *__pyx_f_6pandas_5tslib__ensure_int64(PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ensure_int64", 0);

  /* "pandas/tslib.pyx":1995
 * 
 * cdef _ensure_int64(object arr):
 *     if util.is_array(arr):             # <<<<<<<<<<<<<<
 *         if (<ndarray> arr).descr.type_num == NPY_INT64:
 *             return arr
 */
  __pyx_t_1 = __pyx_f_4util_is_array(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":1996
 * cdef _ensure_int64(object arr):
 *     if util.is_array(arr):
 *         if (<ndarray> arr).descr.type_num == NPY_INT64:             # <<<<<<<<<<<<<<
 *             return arr
 *         else:
 */
    __pyx_t_2 = (((PyArrayObject *)__pyx_v_arr)->descr->type_num == NPY_INT64);
    if (__pyx_t_2) {

      /* "pandas/tslib.pyx":1997
 *     if util.is_array(arr):
 *         if (<ndarray> arr).descr.type_num == NPY_INT64:
 *             return arr             # <<<<<<<<<<<<<<
 *         else:
 *             return arr.astype(np.int64)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_arr);
      __pyx_r = __pyx_v_arr;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1999
 *             return arr
 *         else:
 *             return arr.astype(np.int64)             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array(arr, dtype=np.int64)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2001
 *             return arr.astype(np.int64)
 *     else:
 *         return np.array(arr, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_arr);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr);
    __Pyx_GIVEREF(__pyx_v_arr);
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* "pandas/tslib.pyx":2004
 * 
 * 
 * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t pivot, left = 0, right = n
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_5tslib_bisect_right_i8(__pyx_t_5numpy_int64_t *__pyx_v_data, __pyx_t_5numpy_int64_t __pyx_v_val, Py_ssize_t __pyx_v_n) {
  Py_ssize_t __pyx_v_pivot;
  Py_ssize_t __pyx_v_left;
  Py_ssize_t __pyx_v_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bisect_right_i8", 0);

  /* "pandas/tslib.pyx":2005
 * 
 * cdef inline bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n):
 *     cdef Py_ssize_t pivot, left = 0, right = n             # <<<<<<<<<<<<<<
 * 
 *     # edge cases
 */
  __pyx_v_left = 0;
  __pyx_v_right = __pyx_v_n;

  /* "pandas/tslib.pyx":2008
 * 
 *     # edge cases
 *     if val > data[n - 1]:             # <<<<<<<<<<<<<<
 *         return n
 * 
 */
  __pyx_t_1 = (__pyx_v_val > (__pyx_v_data[(__pyx_v_n - 1)]));
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2009
 *     # edge cases
 *     if val > data[n - 1]:
 *         return n             # <<<<<<<<<<<<<<
 * 
 *     if val < data[0]:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2011
 *         return n
 * 
 *     if val < data[0]:             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  __pyx_t_1 = (__pyx_v_val < (__pyx_v_data[0]));
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2012
 * 
 *     if val < data[0]:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     while left < right:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":2014
 *         return 0
 * 
 *     while left < right:             # <<<<<<<<<<<<<<
 *         pivot = left + (right - left) // 2
 * 
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_left < __pyx_v_right);
    if (!__pyx_t_1) break;

    /* "pandas/tslib.pyx":2015
 * 
 *     while left < right:
 *         pivot = left + (right - left) // 2             # <<<<<<<<<<<<<<
 * 
 *         if data[pivot] <= val:
 */
    __pyx_v_pivot = (__pyx_v_left + __Pyx_div_Py_ssize_t((__pyx_v_right - __pyx_v_left), 2));

    /* "pandas/tslib.pyx":2017
 *         pivot = left + (right - left) // 2
 * 
 *         if data[pivot] <= val:             # <<<<<<<<<<<<<<
 *             left = pivot + 1
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_data[__pyx_v_pivot]) <= __pyx_v_val);
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":2018
 * 
 *         if data[pivot] <= val:
 *             left = pivot + 1             # <<<<<<<<<<<<<<
 *         else:
 *             right = pivot
 */
      __pyx_v_left = (__pyx_v_pivot + 1);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2020
 *             left = pivot + 1
 *         else:
 *             right = pivot             # <<<<<<<<<<<<<<
 * 
 *     return left
 */
      __pyx_v_right = __pyx_v_pivot;
    }
    __pyx_L7:;
  }

  /* "pandas/tslib.pyx":2022
 *             right = pivot
 * 
 *     return left             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas.tslib.bisect_right_i8", __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_5tslib_59build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/
static char __pyx_doc_6pandas_5tslib_58build_field_sarray[] = "\n    Datetime as int64 representation to a structured array of fields\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_59build_field_sarray = {__Pyx_NAMESTR("build_field_sarray"), (PyCFunction)__pyx_pw_6pandas_5tslib_59build_field_sarray, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_58build_field_sarray)};
static PyObject *__pyx_pw_6pandas_5tslib_59build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("build_field_sarray (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_58build_field_sarray(__pyx_self, ((PyArrayObject *)__pyx_v_dtindex));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2028
 * #----------------------------------------------------------------------
 * 
 * def build_field_sarray(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */

static PyObject *__pyx_pf_6pandas_5tslib_58build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_count;
  pandas_datetimestruct __pyx_v_dts;
  PyArrayObject *__pyx_v_years = 0;
  PyArrayObject *__pyx_v_months = 0;
  PyArrayObject *__pyx_v_days = 0;
  PyArrayObject *__pyx_v_hours = 0;
  PyArrayObject *__pyx_v_minutes = 0;
  PyArrayObject *__pyx_v_seconds = 0;
  PyArrayObject *__pyx_v_mus = 0;
  PyObject *__pyx_v_sa_dtype = NULL;
  PyObject *__pyx_v_out = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_days;
  __Pyx_Buffer __pyx_pybuffer_days;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex;
  __Pyx_Buffer __pyx_pybuffer_dtindex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_hours;
  __Pyx_Buffer __pyx_pybuffer_hours;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_minutes;
  __Pyx_Buffer __pyx_pybuffer_minutes;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_months;
  __Pyx_Buffer __pyx_pybuffer_months;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mus;
  __Pyx_Buffer __pyx_pybuffer_mus;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seconds;
  __Pyx_Buffer __pyx_pybuffer_seconds;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_years;
  __Pyx_Buffer __pyx_pybuffer_years;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  npy_int64 __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  npy_int32 __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("build_field_sarray", 0);
  __pyx_pybuffer_years.pybuffer.buf = NULL;
  __pyx_pybuffer_years.refcount = 0;
  __pyx_pybuffernd_years.data = NULL;
  __pyx_pybuffernd_years.rcbuffer = &__pyx_pybuffer_years;
  __pyx_pybuffer_months.pybuffer.buf = NULL;
  __pyx_pybuffer_months.refcount = 0;
  __pyx_pybuffernd_months.data = NULL;
  __pyx_pybuffernd_months.rcbuffer = &__pyx_pybuffer_months;
  __pyx_pybuffer_days.pybuffer.buf = NULL;
  __pyx_pybuffer_days.refcount = 0;
  __pyx_pybuffernd_days.data = NULL;
  __pyx_pybuffernd_days.rcbuffer = &__pyx_pybuffer_days;
  __pyx_pybuffer_hours.pybuffer.buf = NULL;
  __pyx_pybuffer_hours.refcount = 0;
  __pyx_pybuffernd_hours.data = NULL;
  __pyx_pybuffernd_hours.rcbuffer = &__pyx_pybuffer_hours;
  __pyx_pybuffer_minutes.pybuffer.buf = NULL;
  __pyx_pybuffer_minutes.refcount = 0;
  __pyx_pybuffernd_minutes.data = NULL;
  __pyx_pybuffernd_minutes.rcbuffer = &__pyx_pybuffer_minutes;
  __pyx_pybuffer_seconds.pybuffer.buf = NULL;
  __pyx_pybuffer_seconds.refcount = 0;
  __pyx_pybuffernd_seconds.data = NULL;
  __pyx_pybuffernd_seconds.rcbuffer = &__pyx_pybuffer_seconds;
  __pyx_pybuffer_mus.pybuffer.buf = NULL;
  __pyx_pybuffer_mus.refcount = 0;
  __pyx_pybuffernd_mus.data = NULL;
  __pyx_pybuffernd_mus.rcbuffer = &__pyx_pybuffer_mus;
  __pyx_pybuffer_dtindex.pybuffer.buf = NULL;
  __pyx_pybuffer_dtindex.refcount = 0;
  __pyx_pybuffernd_dtindex.data = NULL;
  __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2033
 *     '''
 *     cdef:
 *         Py_ssize_t i, count = 0             # <<<<<<<<<<<<<<
 *         int isleap
 *         pandas_datetimestruct dts
 */
  __pyx_v_count = 0;

  /* "pandas/tslib.pyx":2038
 *         ndarray[int32_t] years, months, days, hours, minutes, seconds, mus
 * 
 *     count = len(dtindex)             # <<<<<<<<<<<<<<
 * 
 *     sa_dtype = [('Y', 'i4'), # year
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_count = __pyx_t_1;

  /* "pandas/tslib.pyx":2046
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second
 *                 ('u', 'i4')] # microsecond             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty(count, dtype=sa_dtype)
 */
  __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_109));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_k_tuple_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_110));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_k_tuple_110));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_111));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_k_tuple_111));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_112));
  PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_k_tuple_112));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_113));
  PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_k_tuple_113));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_114));
  PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_k_tuple_114));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_115));
  PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_k_tuple_115));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));
  __pyx_v_sa_dtype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":2048
 *                 ('u', 'i4')] # microsecond
 * 
 *     out = np.empty(count, dtype=sa_dtype)             # <<<<<<<<<<<<<<
 * 
 *     years = out['Y']
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __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_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_v_sa_dtype)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2050
 *     out = np.empty(count, dtype=sa_dtype)
 * 
 *     years = out['Y']             # <<<<<<<<<<<<<<
 *     months = out['M']
 *     days = out['D']
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__Y)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_years.rcbuffer->pybuffer, (PyObject*)__pyx_v_years, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_years.diminfo[0].strides = __pyx_pybuffernd_years.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_years.diminfo[0].shape = __pyx_pybuffernd_years.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_years = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2051
 * 
 *     years = out['Y']
 *     months = out['M']             # <<<<<<<<<<<<<<
 *     days = out['D']
 *     hours = out['h']
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__M)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_months.rcbuffer->pybuffer, (PyObject*)__pyx_v_months, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_months.diminfo[0].strides = __pyx_pybuffernd_months.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_months.diminfo[0].shape = __pyx_pybuffernd_months.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_months = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2052
 *     years = out['Y']
 *     months = out['M']
 *     days = out['D']             # <<<<<<<<<<<<<<
 *     hours = out['h']
 *     minutes = out['m']
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__D)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_days.rcbuffer->pybuffer, (PyObject*)__pyx_v_days, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_days.diminfo[0].strides = __pyx_pybuffernd_days.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_days.diminfo[0].shape = __pyx_pybuffernd_days.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_days = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2053
 *     months = out['M']
 *     days = out['D']
 *     hours = out['h']             # <<<<<<<<<<<<<<
 *     minutes = out['m']
 *     seconds = out['s']
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__h)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_hours.rcbuffer->pybuffer, (PyObject*)__pyx_v_hours, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_hours.diminfo[0].strides = __pyx_pybuffernd_hours.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_hours.diminfo[0].shape = __pyx_pybuffernd_hours.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_hours = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2054
 *     days = out['D']
 *     hours = out['h']
 *     minutes = out['m']             # <<<<<<<<<<<<<<
 *     seconds = out['s']
 *     mus = out['u']
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__m)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer, (PyObject*)__pyx_v_minutes, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_minutes.diminfo[0].strides = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_minutes.diminfo[0].shape = __pyx_pybuffernd_minutes.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_minutes = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2055
 *     hours = out['h']
 *     minutes = out['m']
 *     seconds = out['s']             # <<<<<<<<<<<<<<
 *     mus = out['u']
 * 
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__s)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer, (PyObject*)__pyx_v_seconds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_seconds.diminfo[0].strides = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seconds.diminfo[0].shape = __pyx_pybuffernd_seconds.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_seconds = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2056
 *     minutes = out['m']
 *     seconds = out['s']
 *     mus = out['u']             # <<<<<<<<<<<<<<
 * 
 *     for i in range(count):
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_v_out, ((PyObject *)__pyx_n_s__u)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mus.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mus.rcbuffer->pybuffer, (PyObject*)__pyx_v_mus, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_mus.diminfo[0].strides = __pyx_pybuffernd_mus.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mus.diminfo[0].shape = __pyx_pybuffernd_mus.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_mus = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2058
 *     mus = out['u']
 * 
 *     for i in range(count):             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *         years[i] = dts.year
 */
  __pyx_t_1 = __pyx_v_count;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/tslib.pyx":2059
 * 
 *     for i in range(count):
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *         years[i] = dts.year
 *         months[i] = dts.month
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_dtindex.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":2060
 *     for i in range(count):
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *         years[i] = dts.year             # <<<<<<<<<<<<<<
 *         months[i] = dts.month
 *         days[i] = dts.day
 */
    __pyx_t_13 = __pyx_v_dts.year;
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_years.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_years.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_years.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_years.diminfo[0].strides) = __pyx_t_13;

    /* "pandas/tslib.pyx":2061
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *         years[i] = dts.year
 *         months[i] = dts.month             # <<<<<<<<<<<<<<
 *         days[i] = dts.day
 *         hours[i] = dts.hour
 */
    __pyx_t_15 = __pyx_v_dts.month;
    __pyx_t_16 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_16 < 0) {
      __pyx_t_16 += __pyx_pybuffernd_months.diminfo[0].shape;
      if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_months.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_months.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_months.diminfo[0].strides) = __pyx_t_15;

    /* "pandas/tslib.pyx":2062
 *         years[i] = dts.year
 *         months[i] = dts.month
 *         days[i] = dts.day             # <<<<<<<<<<<<<<
 *         hours[i] = dts.hour
 *         minutes[i] = dts.min
 */
    __pyx_t_15 = __pyx_v_dts.day;
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_days.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_days.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_days.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_days.diminfo[0].strides) = __pyx_t_15;

    /* "pandas/tslib.pyx":2063
 *         months[i] = dts.month
 *         days[i] = dts.day
 *         hours[i] = dts.hour             # <<<<<<<<<<<<<<
 *         minutes[i] = dts.min
 *         seconds[i] = dts.sec
 */
    __pyx_t_15 = __pyx_v_dts.hour;
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_pybuffernd_hours.diminfo[0].shape;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_hours.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_hours.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_hours.diminfo[0].strides) = __pyx_t_15;

    /* "pandas/tslib.pyx":2064
 *         days[i] = dts.day
 *         hours[i] = dts.hour
 *         minutes[i] = dts.min             # <<<<<<<<<<<<<<
 *         seconds[i] = dts.sec
 *         mus[i] = dts.us
 */
    __pyx_t_15 = __pyx_v_dts.min;
    __pyx_t_19 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_19 < 0) {
      __pyx_t_19 += __pyx_pybuffernd_minutes.diminfo[0].shape;
      if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_minutes.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_minutes.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_minutes.diminfo[0].strides) = __pyx_t_15;

    /* "pandas/tslib.pyx":2065
 *         hours[i] = dts.hour
 *         minutes[i] = dts.min
 *         seconds[i] = dts.sec             # <<<<<<<<<<<<<<
 *         mus[i] = dts.us
 * 
 */
    __pyx_t_15 = __pyx_v_dts.sec;
    __pyx_t_20 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_pybuffernd_seconds.diminfo[0].shape;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_seconds.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_seconds.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_seconds.diminfo[0].strides) = __pyx_t_15;

    /* "pandas/tslib.pyx":2066
 *         minutes[i] = dts.min
 *         seconds[i] = dts.sec
 *         mus[i] = dts.us             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
    __pyx_t_15 = __pyx_v_dts.us;
    __pyx_t_21 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_pybuffernd_mus.diminfo[0].shape;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_mus.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_mus.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_mus.diminfo[0].strides) = __pyx_t_15;
  }

  /* "pandas/tslib.pyx":2068
 *         mus[i] = dts.us
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * def get_time_micros(ndarray[int64_t] dtindex):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.build_field_sarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_days.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_hours.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_minutes.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_months.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mus.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seconds.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_years.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_years);
  __Pyx_XDECREF((PyObject *)__pyx_v_months);
  __Pyx_XDECREF((PyObject *)__pyx_v_days);
  __Pyx_XDECREF((PyObject *)__pyx_v_hours);
  __Pyx_XDECREF((PyObject *)__pyx_v_minutes);
  __Pyx_XDECREF((PyObject *)__pyx_v_seconds);
  __Pyx_XDECREF((PyObject *)__pyx_v_mus);
  __Pyx_XDECREF(__pyx_v_sa_dtype);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_61get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/
static char __pyx_doc_6pandas_5tslib_60get_time_micros[] = "\n    Datetime as int64 representation to a structured array of fields\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_61get_time_micros = {__Pyx_NAMESTR("get_time_micros"), (PyCFunction)__pyx_pw_6pandas_5tslib_61get_time_micros, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_60get_time_micros)};
static PyObject *__pyx_pw_6pandas_5tslib_61get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_time_micros (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_60get_time_micros(__pyx_self, ((PyArrayObject *)__pyx_v_dtindex));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2070
 *     return out
 * 
 * def get_time_micros(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */

static PyObject *__pyx_pf_6pandas_5tslib_60get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  pandas_datetimestruct __pyx_v_dts;
  PyArrayObject *__pyx_v_micros = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex;
  __Pyx_Buffer __pyx_pybuffer_dtindex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_micros;
  __Pyx_Buffer __pyx_pybuffer_micros;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_time_micros", 0);
  __pyx_pybuffer_micros.pybuffer.buf = NULL;
  __pyx_pybuffer_micros.refcount = 0;
  __pyx_pybuffernd_micros.data = NULL;
  __pyx_pybuffernd_micros.rcbuffer = &__pyx_pybuffer_micros;
  __pyx_pybuffer_dtindex.pybuffer.buf = NULL;
  __pyx_pybuffer_dtindex.refcount = 0;
  __pyx_pybuffernd_dtindex.data = NULL;
  __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2075
 *     '''
 *     cdef:
 *         Py_ssize_t i, n = len(dtindex)             # <<<<<<<<<<<<<<
 *         pandas_datetimestruct dts
 *         ndarray[int64_t] micros
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2079
 *         ndarray[int64_t] micros
 * 
 *     micros = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_micros.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_micros.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_micros.rcbuffer->pybuffer, (PyObject*)__pyx_v_micros, &__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_micros.diminfo[0].strides = __pyx_pybuffernd_micros.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_micros.diminfo[0].shape = __pyx_pybuffernd_micros.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_micros = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":2081
 *     micros = np.empty(n, dtype=np.int64)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *         micros[i] = 1000000LL * (dts.hour * 60 * 60 +
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/tslib.pyx":2082
 * 
 *     for i in range(n):
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *         micros[i] = 1000000LL * (dts.hour * 60 * 60 +
 *                                  60 * dts.min + dts.sec) + dts.us
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_dtindex.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

    /* "pandas/tslib.pyx":2083
 *     for i in range(n):
 *         pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *         micros[i] = 1000000LL * (dts.hour * 60 * 60 +             # <<<<<<<<<<<<<<
 *                                  60 * dts.min + dts.sec) + dts.us
 * 
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_micros.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_micros.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_micros.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_micros.diminfo[0].strides) = ((1000000LL * ((((__pyx_v_dts.hour * 60) * 60) + (60 * __pyx_v_dts.min)) + __pyx_v_dts.sec)) + __pyx_v_dts.us);
  }

  /* "pandas/tslib.pyx":2086
 *                                  60 * dts.min + dts.sec) + dts.us
 * 
 *     return micros             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_micros));
  __pyx_r = ((PyObject *)__pyx_v_micros);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_63get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_62get_date_field[] = "\n    Given a int64-based datetime index, extract the year, month, etc.,\n    field and return an array of these values.\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_63get_date_field = {__Pyx_NAMESTR("get_date_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_63get_date_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_62get_date_field)};
static PyObject *__pyx_pw_6pandas_5tslib_63get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_dtindex = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_date_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dtindex,&__pyx_n_s__field,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__dtindex)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_date_field", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __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_date_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __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_dtindex = ((PyArrayObject *)values[0]);
    __pyx_v_field = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_date_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.get_date_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtindex), __pyx_ptype_5numpy_ndarray, 1, "dtindex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_62get_date_field(__pyx_self, __pyx_v_dtindex, __pyx_v_field);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2089
 * 
 * @cython.wraparound(False)
 * def get_date_field(ndarray[int64_t] dtindex, object field):             # <<<<<<<<<<<<<<
 *     '''
 *     Given a int64-based datetime index, extract the year, month, etc.,
 */

static PyObject *__pyx_pf_6pandas_5tslib_62get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field) {
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_count;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v__month_offset = 0;
  int __pyx_v_isleap;
  int __pyx_v_isleap_prev;
  pandas_datetimestruct __pyx_v_dts;
  int __pyx_v_mo_off;
  int __pyx_v_doy;
  int __pyx_v_dow;
  int __pyx_v_woy;
  __Pyx_LocalBuf_ND __pyx_pybuffernd__month_offset;
  __Pyx_Buffer __pyx_pybuffer__month_offset;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dtindex;
  __Pyx_Buffer __pyx_pybuffer_dtindex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyArrayObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  npy_int64 __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  npy_int32 __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  Py_ssize_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  Py_ssize_t __pyx_t_43;
  Py_ssize_t __pyx_t_44;
  Py_ssize_t __pyx_t_45;
  Py_ssize_t __pyx_t_46;
  Py_ssize_t __pyx_t_47;
  Py_ssize_t __pyx_t_48;
  Py_ssize_t __pyx_t_49;
  Py_ssize_t __pyx_t_50;
  Py_ssize_t __pyx_t_51;
  long __pyx_t_52;
  int __pyx_t_53;
  Py_ssize_t __pyx_t_54;
  Py_ssize_t __pyx_t_55;
  Py_ssize_t __pyx_t_56;
  Py_ssize_t __pyx_t_57;
  Py_ssize_t __pyx_t_58;
  Py_ssize_t __pyx_t_59;
  Py_ssize_t __pyx_t_60;
  Py_ssize_t __pyx_t_61;
  Py_ssize_t __pyx_t_62;
  long __pyx_t_63;
  int __pyx_t_64;
  int __pyx_t_65;
  int __pyx_t_66;
  Py_ssize_t __pyx_t_67;
  Py_ssize_t __pyx_t_68;
  Py_ssize_t __pyx_t_69;
  Py_ssize_t __pyx_t_70;
  Py_ssize_t __pyx_t_71;
  Py_ssize_t __pyx_t_72;
  Py_ssize_t __pyx_t_73;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_date_field", 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__month_offset.pybuffer.buf = NULL;
  __pyx_pybuffer__month_offset.refcount = 0;
  __pyx_pybuffernd__month_offset.data = NULL;
  __pyx_pybuffernd__month_offset.rcbuffer = &__pyx_pybuffer__month_offset;
  __pyx_pybuffer_dtindex.pybuffer.buf = NULL;
  __pyx_pybuffer_dtindex.refcount = 0;
  __pyx_pybuffernd_dtindex.data = NULL;
  __pyx_pybuffernd_dtindex.rcbuffer = &__pyx_pybuffer_dtindex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtindex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dtindex.diminfo[0].strides = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtindex.diminfo[0].shape = __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2096
 *     cdef:
 *         _TSObject ts
 *         Py_ssize_t i, count = 0             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] out
 *         ndarray[int32_t, ndim=2] _month_offset
 */
  __pyx_v_count = 0;

  /* "pandas/tslib.pyx":2103
 *         int mo_off, doy, dow, woy
 * 
 *     _month_offset = np.array(             # <<<<<<<<<<<<<<
 *         [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ],
 *          [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]],
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":2104
 * 
 *     _month_offset = np.array(
 *         [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ],             # <<<<<<<<<<<<<<
 *          [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]],
 *          dtype=np.int32 )
 */
  __pyx_t_1 = PyList_New(13); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_31);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_31);
  __Pyx_GIVEREF(__pyx_int_31);
  __Pyx_INCREF(__pyx_int_59);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_59);
  __Pyx_GIVEREF(__pyx_int_59);
  __Pyx_INCREF(__pyx_int_90);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_90);
  __Pyx_GIVEREF(__pyx_int_90);
  __Pyx_INCREF(__pyx_int_120);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_120);
  __Pyx_GIVEREF(__pyx_int_120);
  __Pyx_INCREF(__pyx_int_151);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_151);
  __Pyx_GIVEREF(__pyx_int_151);
  __Pyx_INCREF(__pyx_int_181);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_int_181);
  __Pyx_GIVEREF(__pyx_int_181);
  __Pyx_INCREF(__pyx_int_212);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_int_212);
  __Pyx_GIVEREF(__pyx_int_212);
  __Pyx_INCREF(__pyx_int_243);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_int_243);
  __Pyx_GIVEREF(__pyx_int_243);
  __Pyx_INCREF(__pyx_int_273);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_int_273);
  __Pyx_GIVEREF(__pyx_int_273);
  __Pyx_INCREF(__pyx_int_304);
  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_int_304);
  __Pyx_GIVEREF(__pyx_int_304);
  __Pyx_INCREF(__pyx_int_334);
  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_int_334);
  __Pyx_GIVEREF(__pyx_int_334);
  __Pyx_INCREF(__pyx_int_365);
  PyList_SET_ITEM(__pyx_t_1, 12, __pyx_int_365);
  __Pyx_GIVEREF(__pyx_int_365);

  /* "pandas/tslib.pyx":2105
 *     _month_offset = np.array(
 *         [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ],
 *          [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]],             # <<<<<<<<<<<<<<
 *          dtype=np.int32 )
 * 
 */
  __pyx_t_3 = PyList_New(13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_31);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_31);
  __Pyx_GIVEREF(__pyx_int_31);
  __Pyx_INCREF(__pyx_int_60);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_60);
  __Pyx_GIVEREF(__pyx_int_60);
  __Pyx_INCREF(__pyx_int_91);
  PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_91);
  __Pyx_GIVEREF(__pyx_int_91);
  __Pyx_INCREF(__pyx_int_121);
  PyList_SET_ITEM(__pyx_t_3, 4, __pyx_int_121);
  __Pyx_GIVEREF(__pyx_int_121);
  __Pyx_INCREF(__pyx_int_152);
  PyList_SET_ITEM(__pyx_t_3, 5, __pyx_int_152);
  __Pyx_GIVEREF(__pyx_int_152);
  __Pyx_INCREF(__pyx_int_182);
  PyList_SET_ITEM(__pyx_t_3, 6, __pyx_int_182);
  __Pyx_GIVEREF(__pyx_int_182);
  __Pyx_INCREF(__pyx_int_213);
  PyList_SET_ITEM(__pyx_t_3, 7, __pyx_int_213);
  __Pyx_GIVEREF(__pyx_int_213);
  __Pyx_INCREF(__pyx_int_244);
  PyList_SET_ITEM(__pyx_t_3, 8, __pyx_int_244);
  __Pyx_GIVEREF(__pyx_int_244);
  __Pyx_INCREF(__pyx_int_274);
  PyList_SET_ITEM(__pyx_t_3, 9, __pyx_int_274);
  __Pyx_GIVEREF(__pyx_int_274);
  __Pyx_INCREF(__pyx_int_305);
  PyList_SET_ITEM(__pyx_t_3, 10, __pyx_int_305);
  __Pyx_GIVEREF(__pyx_int_305);
  __Pyx_INCREF(__pyx_int_335);
  PyList_SET_ITEM(__pyx_t_3, 11, __pyx_int_335);
  __Pyx_GIVEREF(__pyx_int_335);
  __Pyx_INCREF(__pyx_int_366);
  PyList_SET_ITEM(__pyx_t_3, 12, __pyx_int_366);
  __Pyx_GIVEREF(__pyx_int_366);
  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":2103
 *         int mo_off, doy, dow, woy
 * 
 *     _month_offset = np.array(             # <<<<<<<<<<<<<<
 *         [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ],
 *          [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]],
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "pandas/tslib.pyx":2106
 *         [[ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ],
 *          [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]],
 *          dtype=np.int32 )             # <<<<<<<<<<<<<<
 * 
 *     count = len(dtindex)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 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__month_offset.rcbuffer->pybuffer, (PyObject*)__pyx_v__month_offset, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 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__month_offset.diminfo[0].strides = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__month_offset.diminfo[0].shape = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd__month_offset.diminfo[1].strides = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd__month_offset.diminfo[1].shape = __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v__month_offset = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2108
 *          dtype=np.int32 )
 * 
 *     count = len(dtindex)             # <<<<<<<<<<<<<<
 *     out = np.empty(count, dtype='i4')
 * 
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_count = __pyx_t_11;

  /* "pandas/tslib.pyx":2109
 * 
 *     count = len(dtindex)
 *     out = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     if field == 'Y':
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_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[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":2111
 *     out = np.empty(count, dtype='i4')
 * 
 *     if field == 'Y':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__Y), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2112
 * 
 *     if field == 'Y':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2113
 *     if field == 'Y':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__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[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L4_continue;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "pandas/tslib.pyx":2115
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.year
 *         return out
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2116
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.year             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_18 = __pyx_v_dts.year;
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_19 >= __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[0]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_18;
      __pyx_L4_continue:;
    }

    /* "pandas/tslib.pyx":2117
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.year
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'M':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2119
 *         return out
 * 
 *     elif field == 'M':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__M), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2120
 * 
 *     elif field == 'M':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2121
 *     elif field == 'M':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_21 >= __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[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "pandas/tslib.pyx":2123
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.month
 *         return out
 */
      __pyx_t_22 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_22 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2124
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.month             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_23 = __pyx_v_dts.month;
      __pyx_t_24 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_24 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_24 >= __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[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;
      __pyx_L7_continue:;
    }

    /* "pandas/tslib.pyx":2125
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.month
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'D':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2127
 *         return out
 * 
 *     elif field == 'D':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2128
 * 
 *     elif field == 'D':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2129
 *     elif field == 'D':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_25 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_26 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_26 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_26 >= __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[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L10_continue;
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "pandas/tslib.pyx":2131
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.day
 *         return out
 */
      __pyx_t_27 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_27 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2132
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.day             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_23 = __pyx_v_dts.day;
      __pyx_t_28 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_28 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_28 >= __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[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;
      __pyx_L10_continue:;
    }

    /* "pandas/tslib.pyx":2133
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.day
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'h':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2135
 *         return out
 * 
 *     elif field == 'h':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__h), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2136
 * 
 *     elif field == 'h':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2137
 *     elif field == 'h':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_29 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_29 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_30 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_30 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_30 >= __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[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L13_continue;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "pandas/tslib.pyx":2139
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.hour
 *         return out
 */
      __pyx_t_31 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_31 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2140
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.hour             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_23 = __pyx_v_dts.hour;
      __pyx_t_32 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_32 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_32 >= __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[0]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;
      __pyx_L13_continue:;
    }

    /* "pandas/tslib.pyx":2141
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.hour
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'm':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2143
 *         return out
 * 
 *     elif field == 'm':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__m), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2144
 * 
 *     elif field == 'm':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2145
 *     elif field == 'm':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_33 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_33 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_34 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_34 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_34 >= __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[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L16_continue;
        goto __pyx_L18;
      }
      __pyx_L18:;

      /* "pandas/tslib.pyx":2147
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.min
 *         return out
 */
      __pyx_t_35 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_35 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2148
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.min             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_23 = __pyx_v_dts.min;
      __pyx_t_36 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_36 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_36 >= __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[0]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;
      __pyx_L16_continue:;
    }

    /* "pandas/tslib.pyx":2149
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.min
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 's':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2151
 *         return out
 * 
 *     elif field == 's':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2152
 * 
 *     elif field == 's':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2153
 *     elif field == 's':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_37 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_37 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_38 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_38 >= __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[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L19_continue;
        goto __pyx_L21;
      }
      __pyx_L21:;

      /* "pandas/tslib.pyx":2155
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.sec
 *         return out
 */
      __pyx_t_39 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_39 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2156
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.sec             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_23 = __pyx_v_dts.sec;
      __pyx_t_40 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_40 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_40 >= __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[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;
      __pyx_L19_continue:;
    }

    /* "pandas/tslib.pyx":2157
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.sec
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'us':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2159
 *         return out
 * 
 *     elif field == 'us':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__us), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2160
 * 
 *     elif field == 'us':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2161
 *     elif field == 'us':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_41 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_41 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_42 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_42 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_42 >= __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[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L22_continue;
        goto __pyx_L24;
      }
      __pyx_L24:;

      /* "pandas/tslib.pyx":2163
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.us
 *         return out
 */
      __pyx_t_43 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_43 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2164
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.us             # <<<<<<<<<<<<<<
 *         return out
 *     elif field == 'ns':
 */
      __pyx_t_23 = __pyx_v_dts.us;
      __pyx_t_44 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_44 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_44 >= __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[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;
      __pyx_L22_continue:;
    }

    /* "pandas/tslib.pyx":2165
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.us
 *         return out             # <<<<<<<<<<<<<<
 *     elif field == 'ns':
 *         for i in range(count):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2166
 *             out[i] = dts.us
 *         return out
 *     elif field == 'ns':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__ns), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2167
 *         return out
 *     elif field == 'ns':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2168
 *     elif field == 'ns':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_45 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_45 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_46 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_46 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_46 >= __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[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L25_continue;
        goto __pyx_L27;
      }
      __pyx_L27:;

      /* "pandas/tslib.pyx":2170
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.ps / 1000
 *         return out
 */
      __pyx_t_47 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_47 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2171
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.ps / 1000             # <<<<<<<<<<<<<<
 *         return out
 *     elif field == 'doy':
 */
      __pyx_t_48 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_48 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_48 >= __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[0]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_div_long(__pyx_v_dts.ps, 1000);
      __pyx_L25_continue:;
    }

    /* "pandas/tslib.pyx":2172
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.ps / 1000
 *         return out             # <<<<<<<<<<<<<<
 *     elif field == 'doy':
 *         for i in range(count):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2173
 *             out[i] = dts.ps / 1000
 *         return out
 *     elif field == 'doy':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__doy), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2174
 *         return out
 *     elif field == 'doy':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2175
 *     elif field == 'doy':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_49 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_49 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_49, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_50 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_50 < 0) {
          __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_50 >= __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[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L28_continue;
        goto __pyx_L30;
      }
      __pyx_L30:;

      /* "pandas/tslib.pyx":2177
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             isleap = is_leapyear(dts.year)
 *             out[i] = _month_offset[isleap, dts.month-1] + dts.day
 */
      __pyx_t_51 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_51 < 0) {
        __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_51 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2178
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *             out[i] = _month_offset[isleap, dts.month-1] + dts.day
 *         return out
 */
      __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

      /* "pandas/tslib.pyx":2179
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             isleap = is_leapyear(dts.year)
 *             out[i] = _month_offset[isleap, dts.month-1] + dts.day             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_7 = __pyx_v_isleap;
      __pyx_t_52 = (__pyx_v_dts.month - 1);
      __pyx_t_53 = -1;
      if (__pyx_t_7 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_53 = 0;
      if (__pyx_t_52 < 0) {
        __pyx_t_53 = 1;
      } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_53 = 1;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_54 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_54 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_52, __pyx_pybuffernd__month_offset.diminfo[1].strides)) + __pyx_v_dts.day);
      __pyx_L28_continue:;
    }

    /* "pandas/tslib.pyx":2180
 *             isleap = is_leapyear(dts.year)
 *             out[i] = _month_offset[isleap, dts.month-1] + dts.day
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'dow':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2182
 *         return out
 * 
 *     elif field == 'dow':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__dow), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2183
 * 
 *     elif field == 'dow':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2184
 *     elif field == 'dow':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             ts = convert_to_tsobject(dtindex[i], None, None)
 */
      __pyx_t_55 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_55 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_55, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_56 = __pyx_v_i;
        __pyx_t_53 = -1;
        if (__pyx_t_56 < 0) {
          __pyx_t_53 = 0;
        } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0;
        if (unlikely(__pyx_t_53 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_53);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L31_continue;
        goto __pyx_L33;
      }
      __pyx_L33:;

      /* "pandas/tslib.pyx":2186
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *             out[i] = ts_dayofweek(ts)
 *         return out
 */
      __pyx_t_57 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_57 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = Py_None;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_3 = Py_None;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_ts));
      __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":2187
 * 
 *             ts = convert_to_tsobject(dtindex[i], None, None)
 *             out[i] = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_58 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_58 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_58 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);
      __pyx_L31_continue:;
    }

    /* "pandas/tslib.pyx":2188
 *             ts = convert_to_tsobject(dtindex[i], None, None)
 *             out[i] = ts_dayofweek(ts)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'woy':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2190
 *         return out
 * 
 *     elif field == 'woy':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__woy), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2191
 * 
 *     elif field == 'woy':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2192
 *     elif field == 'woy':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_59 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_59 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_59 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_13) {
        __pyx_t_60 = __pyx_v_i;
        __pyx_t_53 = -1;
        if (__pyx_t_60 < 0) {
          __pyx_t_53 = 0;
        } else if (unlikely(__pyx_t_60 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_53 = 0;
        if (unlikely(__pyx_t_53 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_53);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_60, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L34_continue;
        goto __pyx_L36;
      }
      __pyx_L36:;

      /* "pandas/tslib.pyx":2194
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             ts = convert_to_tsobject(dtindex[i], None, None)
 *             isleap = is_leapyear(dts.year)
 */
      __pyx_t_61 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_61 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_61 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_61, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2195
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *             isleap = is_leapyear(dts.year)
 *             isleap_prev = is_leapyear(dts.year - 1)
 */
      __pyx_t_62 = __pyx_v_i;
      __pyx_t_53 = -1;
      if (__pyx_t_62 < 0) {
        __pyx_t_53 = 0;
      } else if (unlikely(__pyx_t_62 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_53 = 0;
      if (unlikely(__pyx_t_53 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_53);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_62, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = Py_None;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = Py_None;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_ts));
      __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":2196
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             ts = convert_to_tsobject(dtindex[i], None, None)
 *             isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *             isleap_prev = is_leapyear(dts.year - 1)
 *             mo_off = _month_offset[isleap, dts.month - 1]
 */
      __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

      /* "pandas/tslib.pyx":2197
 *             ts = convert_to_tsobject(dtindex[i], None, None)
 *             isleap = is_leapyear(dts.year)
 *             isleap_prev = is_leapyear(dts.year - 1)             # <<<<<<<<<<<<<<
 *             mo_off = _month_offset[isleap, dts.month - 1]
 *             doy = mo_off + dts.day
 */
      __pyx_v_isleap_prev = is_leapyear((__pyx_v_dts.year - 1));

      /* "pandas/tslib.pyx":2198
 *             isleap = is_leapyear(dts.year)
 *             isleap_prev = is_leapyear(dts.year - 1)
 *             mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *             doy = mo_off + dts.day
 *             dow = ts_dayofweek(ts)
 */
      __pyx_t_53 = __pyx_v_isleap;
      __pyx_t_63 = (__pyx_v_dts.month - 1);
      __pyx_t_64 = -1;
      if (__pyx_t_53 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_64 = 0;
      if (__pyx_t_63 < 0) {
        __pyx_t_64 = 1;
      } else if (unlikely(__pyx_t_63 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_64 = 1;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_mo_off = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_53, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_63, __pyx_pybuffernd__month_offset.diminfo[1].strides));

      /* "pandas/tslib.pyx":2199
 *             isleap_prev = is_leapyear(dts.year - 1)
 *             mo_off = _month_offset[isleap, dts.month - 1]
 *             doy = mo_off + dts.day             # <<<<<<<<<<<<<<
 *             dow = ts_dayofweek(ts)
 * 
 */
      __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dts.day);

      /* "pandas/tslib.pyx":2200
 *             mo_off = _month_offset[isleap, dts.month - 1]
 *             doy = mo_off + dts.day
 *             dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 *             #estimate
 */
      __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

      /* "pandas/tslib.pyx":2203
 * 
 *             #estimate
 *             woy = (doy - 1) - dow + 3             # <<<<<<<<<<<<<<
 *             if woy >= 0:
 *                 woy = woy / 7 + 1
 */
      __pyx_v_woy = (((__pyx_v_doy - 1) - __pyx_v_dow) + 3);

      /* "pandas/tslib.pyx":2204
 *             #estimate
 *             woy = (doy - 1) - dow + 3
 *             if woy >= 0:             # <<<<<<<<<<<<<<
 *                 woy = woy / 7 + 1
 * 
 */
      __pyx_t_13 = (__pyx_v_woy >= 0);
      if (__pyx_t_13) {

        /* "pandas/tslib.pyx":2205
 *             woy = (doy - 1) - dow + 3
 *             if woy >= 0:
 *                 woy = woy / 7 + 1             # <<<<<<<<<<<<<<
 * 
 *             # verify
 */
        __pyx_v_woy = (__Pyx_div_long(__pyx_v_woy, 7) + 1);
        goto __pyx_L37;
      }
      __pyx_L37:;

      /* "pandas/tslib.pyx":2208
 * 
 *             # verify
 *             if woy < 0:             # <<<<<<<<<<<<<<
 *                 if (woy > -2) or (woy == -2 and isleap_prev):
 *                     woy = 53
 */
      __pyx_t_13 = (__pyx_v_woy < 0);
      if (__pyx_t_13) {

        /* "pandas/tslib.pyx":2209
 *             # verify
 *             if woy < 0:
 *                 if (woy > -2) or (woy == -2 and isleap_prev):             # <<<<<<<<<<<<<<
 *                     woy = 53
 *                 else:
 */
        __pyx_t_13 = (__pyx_v_woy > -2);
        if (!__pyx_t_13) {
          __pyx_t_65 = (__pyx_v_woy == -2);
          if (__pyx_t_65) {
            __pyx_t_66 = __pyx_v_isleap_prev;
          } else {
            __pyx_t_66 = __pyx_t_65;
          }
          __pyx_t_65 = __pyx_t_66;
        } else {
          __pyx_t_65 = __pyx_t_13;
        }
        if (__pyx_t_65) {

          /* "pandas/tslib.pyx":2210
 *             if woy < 0:
 *                 if (woy > -2) or (woy == -2 and isleap_prev):
 *                     woy = 53             # <<<<<<<<<<<<<<
 *                 else:
 *                     woy = 52
 */
          __pyx_v_woy = 53;
          goto __pyx_L39;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":2212
 *                     woy = 53
 *                 else:
 *                     woy = 52             # <<<<<<<<<<<<<<
 *             elif woy == 53:
 *                 if 31 - dts.day + dow < 3:
 */
          __pyx_v_woy = 52;
        }
        __pyx_L39:;
        goto __pyx_L38;
      }

      /* "pandas/tslib.pyx":2213
 *                 else:
 *                     woy = 52
 *             elif woy == 53:             # <<<<<<<<<<<<<<
 *                 if 31 - dts.day + dow < 3:
 *                     woy = 1
 */
      __pyx_t_65 = (__pyx_v_woy == 53);
      if (__pyx_t_65) {

        /* "pandas/tslib.pyx":2214
 *                     woy = 52
 *             elif woy == 53:
 *                 if 31 - dts.day + dow < 3:             # <<<<<<<<<<<<<<
 *                     woy = 1
 * 
 */
        __pyx_t_65 = (((31 - __pyx_v_dts.day) + __pyx_v_dow) < 3);
        if (__pyx_t_65) {

          /* "pandas/tslib.pyx":2215
 *             elif woy == 53:
 *                 if 31 - dts.day + dow < 3:
 *                     woy = 1             # <<<<<<<<<<<<<<
 * 
 *             out[i] = woy
 */
          __pyx_v_woy = 1;
          goto __pyx_L40;
        }
        __pyx_L40:;
        goto __pyx_L38;
      }
      __pyx_L38:;

      /* "pandas/tslib.pyx":2217
 *                     woy = 1
 * 
 *             out[i] = woy             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_67 = __pyx_v_i;
      __pyx_t_64 = -1;
      if (__pyx_t_67 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_67 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_67, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_v_woy;
      __pyx_L34_continue:;
    }

    /* "pandas/tslib.pyx":2218
 * 
 *             out[i] = woy
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'q':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2220
 *         return out
 * 
 *     elif field == 'q':             # <<<<<<<<<<<<<<
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__q), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_65 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_65 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_65) {

    /* "pandas/tslib.pyx":2221
 * 
 *     elif field == 'q':
 *         for i in range(count):             # <<<<<<<<<<<<<<
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
    __pyx_t_11 = __pyx_v_count;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_11; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pandas/tslib.pyx":2222
 *     elif field == 'q':
 *         for i in range(count):
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_68 = __pyx_v_i;
      __pyx_t_64 = -1;
      if (__pyx_t_68 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_68 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_64 = 0;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_65 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_68, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_65) {
        __pyx_t_69 = __pyx_v_i;
        __pyx_t_64 = -1;
        if (__pyx_t_69 < 0) {
          __pyx_t_64 = 0;
        } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0;
        if (unlikely(__pyx_t_64 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_64);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
        goto __pyx_L41_continue;
        goto __pyx_L43;
      }
      __pyx_L43:;

      /* "pandas/tslib.pyx":2224
 *             if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = dts.month
 *             out[i] = ((out[i] - 1) / 3) + 1
 */
      __pyx_t_70 = __pyx_v_i;
      __pyx_t_64 = -1;
      if (__pyx_t_70 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_70 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_64 = 0;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_70, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2225
 * 
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.month             # <<<<<<<<<<<<<<
 *             out[i] = ((out[i] - 1) / 3) + 1
 *         return out
 */
      __pyx_t_23 = __pyx_v_dts.month;
      __pyx_t_71 = __pyx_v_i;
      __pyx_t_64 = -1;
      if (__pyx_t_71 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_71 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_71, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_23;

      /* "pandas/tslib.pyx":2226
 *             pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *             out[i] = dts.month
 *             out[i] = ((out[i] - 1) / 3) + 1             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __pyx_t_72 = __pyx_v_i;
      __pyx_t_64 = -1;
      if (__pyx_t_72 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_72 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_73 = __pyx_v_i;
      __pyx_t_64 = -1;
      if (__pyx_t_73 < 0) {
        __pyx_t_64 = 0;
      } else if (unlikely(__pyx_t_73 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_64 = 0;
      if (unlikely(__pyx_t_64 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_64);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_73, __pyx_pybuffernd_out.diminfo[0].strides) = (__Pyx_div_long(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_out.diminfo[0].strides)) - 1), 3) + 1);
      __pyx_L41_continue:;
    }

    /* "pandas/tslib.pyx":2227
 *             out[i] = dts.month
 *             out[i] = ((out[i] - 1) / 3) + 1
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     raise ValueError("Field %s not supported" % field)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __pyx_r = ((PyObject *)__pyx_v_out);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2229
 *         return out
 * 
 *     raise ValueError("Field %s not supported" % field)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_116), __pyx_v_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_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__month_offset.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.get_date_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__month_offset.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtindex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ts);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v__month_offset);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2232
 * 
 * 
 * cdef inline int m8_weekday(int64_t val):             # <<<<<<<<<<<<<<
 *     ts = convert_to_tsobject(val, None, None)
 *     return ts_dayofweek(ts)
 */

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

  /* "pandas/tslib.pyx":2233
 * 
 * cdef inline int m8_weekday(int64_t val):
 *     ts = convert_to_tsobject(val, None, None)             # <<<<<<<<<<<<<<
 *     return ts_dayofweek(ts)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = Py_None;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = Py_None;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_ts = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":2234
 * cdef inline int m8_weekday(int64_t val):
 *     ts = convert_to_tsobject(val, None, None)
 *     return ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 * cdef int64_t DAY_NS = 86400000000000LL
 */
  if (!(likely(((__pyx_v_ts) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ts, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __pyx_v_ts;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_r = __pyx_f_6pandas_5tslib_ts_dayofweek(((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_4));
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_65date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_65date_normalize = {__Pyx_NAMESTR("date_normalize"), (PyCFunction)__pyx_pw_6pandas_5tslib_65date_normalize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_65date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_stamps = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date_normalize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stamps,&__pyx_n_s__tz,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":2239
 * 
 * 
 * def date_normalize(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stamps)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date_normalize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __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_stamps = ((PyArrayObject *)values[0]);
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("date_normalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.date_normalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_64date_normalize(__pyx_self, __pyx_v_stamps, __pyx_v_tz);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_64date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  pandas_datetimestruct __pyx_v_dts;
  CYTHON_UNUSED struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_tso = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_normalize", 0);
  __Pyx_INCREF(__pyx_v_tz);
  __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_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2241
 * def date_normalize(ndarray[int64_t] stamps, tz=None):
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)             # <<<<<<<<<<<<<<
 *         pandas_datetimestruct dts
 *         _TSObject tso
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2244
 *         pandas_datetimestruct dts
 *         _TSObject tso
 *         ndarray[int64_t] result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __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_int64_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[0]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":2246
 *         ndarray[int64_t] result = np.empty(n, dtype=np.int64)
 * 
 *     if tz is not None:             # <<<<<<<<<<<<<<
 *         tso = _TSObject()
 *         if isinstance(tz, basestring):
 */
  __pyx_t_8 = (__pyx_v_tz != Py_None);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":2247
 * 
 *     if tz is not None:
 *         tso = _TSObject()             # <<<<<<<<<<<<<<
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)
 */
    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__TSObject)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_tso = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "pandas/tslib.pyx":2248
 *     if tz is not None:
 *         tso = _TSObject()
 *         if isinstance(tz, basestring):             # <<<<<<<<<<<<<<
 *             tz = pytz.timezone(tz)
 *         result = _normalize_local(stamps, tz)
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__basestring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":2249
 *         tso = _TSObject()
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)             # <<<<<<<<<<<<<<
 *         result = _normalize_local(stamps, tz)
 *     else:
 */
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__timezone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_v_tz);
      __pyx_v_tz = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/tslib.pyx":2250
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)
 *         result = _normalize_local(stamps, tz)             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(n):
 */
    __pyx_t_4 = __pyx_f_6pandas_5tslib__normalize_local(((PyArrayObject *)__pyx_v_stamps), __pyx_v_tz); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_4);
    {
      __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_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_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_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[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2252
 *         result = _normalize_local(stamps, tz)
 *     else:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "pandas/tslib.pyx":2253
 *     else:
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 result[i] = NPY_NAT
 *                 continue
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_8) {

        /* "pandas/tslib.pyx":2254
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
        __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[0]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

        /* "pandas/tslib.pyx":2255
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)
 */
        goto __pyx_L5_continue;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "pandas/tslib.pyx":2256
 *                 result[i] = NPY_NAT
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             result[i] = _normalized_stamp(&dts)
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2257
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_17 >= __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[0]; __pyx_lineno = 2257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts));
      __pyx_L5_continue:;
    }
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2259
 *             result[i] = _normalized_stamp(&dts)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef _normalize_local(ndarray[int64_t] stamps, object tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.date_normalize", __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_stamps.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tso);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2261
 *     return result
 * 
 * cdef _normalize_local(ndarray[int64_t] stamps, object tz):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t n = len(stamps)
 */

static PyObject *__pyx_f_6pandas_5tslib__normalize_local(PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) {
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_trans = 0;
  PyArrayObject *__pyx_v_deltas = 0;
  PyArrayObject *__pyx_v_pos = 0;
  pandas_datetimestruct __pyx_v_dts;
  Py_ssize_t __pyx_v_i;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_v__pos = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas;
  __Pyx_Buffer __pyx_pybuffer_deltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos;
  __Pyx_Buffer __pyx_pybuffer_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_trans;
  __Pyx_Buffer __pyx_pybuffer_trans;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  Py_ssize_t __pyx_t_21;
  npy_datetime __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  PyArrayObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  long __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  __pyx_t_5numpy_int64_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_normalize_local", 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_trans.pybuffer.buf = NULL;
  __pyx_pybuffer_trans.refcount = 0;
  __pyx_pybuffernd_trans.data = NULL;
  __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans;
  __pyx_pybuffer_deltas.pybuffer.buf = NULL;
  __pyx_pybuffer_deltas.refcount = 0;
  __pyx_pybuffernd_deltas.data = NULL;
  __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas;
  __pyx_pybuffer_pos.pybuffer.buf = NULL;
  __pyx_pybuffer_pos.refcount = 0;
  __pyx_pybuffernd_pos.data = NULL;
  __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos;
  __pyx_pybuffer_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2263
 * cdef _normalize_local(ndarray[int64_t] stamps, object tz):
 *     cdef:
 *         Py_ssize_t n = len(stamps)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] result = np.empty(n, dtype=np.int64)
 *         ndarray[int64_t] trans, deltas, pos
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2264
 *     cdef:
 *         Py_ssize_t n = len(stamps)
 *         ndarray[int64_t] result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] trans, deltas, pos
 *         pandas_datetimestruct dts
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __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_int64_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[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":2268
 *         pandas_datetimestruct dts
 * 
 *     if _is_utc(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 */
  __pyx_t_8 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":2269
 * 
 *     if _is_utc(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
      __pyx_v_i = __pyx_t_9;

      /* "pandas/tslib.pyx":2270
 *     if _is_utc(tz):
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 result[i] = NPY_NAT
 *                 continue
 */
      __pyx_t_10 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_10 < 0) {
        __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_8) {

        /* "pandas/tslib.pyx":2271
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
        __pyx_t_12 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_12 < 0) {
          __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

        /* "pandas/tslib.pyx":2272
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)
 */
        goto __pyx_L4_continue;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "pandas/tslib.pyx":2273
 *                 result[i] = NPY_NAT
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             result[i] = _normalized_stamp(&dts)
 *     elif _is_tzlocal(tz):
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2274
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)             # <<<<<<<<<<<<<<
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts));
      __pyx_L4_continue:;
    }
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2275
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)
 *     elif _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":2276
 *             result[i] = _normalized_stamp(&dts)
 *     elif _is_tzlocal(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
      __pyx_v_i = __pyx_t_9;

      /* "pandas/tslib.pyx":2277
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 result[i] = NPY_NAT
 *                 continue
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_8) {

        /* "pandas/tslib.pyx":2278
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 */
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

        /* "pandas/tslib.pyx":2279
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)
 */
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "pandas/tslib.pyx":2280
 *                 result[i] = NPY_NAT
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,             # <<<<<<<<<<<<<<
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "pandas/tslib.pyx":2281
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)             # <<<<<<<<<<<<<<
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 */
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2282
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 */
      __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":2283
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 */
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_18 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_20 = PyTuple_New(8); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_18);
      PyTuple_SET_ITEM(__pyx_t_20, 6, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_19);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_20, 7, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_4 = 0;
      __pyx_t_2 = 0;
      __pyx_t_6 = 0;
      __pyx_t_3 = 0;
      __pyx_t_5 = 0;
      __pyx_t_18 = 0;
      __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
      __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_19);
      __pyx_t_19 = 0;

      /* "pandas/tslib.pyx":2284
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)
 */
      __pyx_t_19 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_20 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_19)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      __pyx_t_20 = 0;
      __pyx_t_20 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
      __pyx_t_19 = PyNumber_Multiply(__pyx_t_20, __pyx_int_1000000000); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_XDECREF(__pyx_v_delta);
      __pyx_v_delta = __pyx_t_19;
      __pyx_t_19 = 0;

      /* "pandas/tslib.pyx":2285
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,             # <<<<<<<<<<<<<<
 *                                               PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)
 */
      __pyx_t_21 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_19 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_20 = PyNumber_Add(__pyx_t_19, __pyx_v_delta); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_22 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_20); if (unlikely((__pyx_t_22 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

      /* "pandas/tslib.pyx":2286
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             result[i] = _normalized_stamp(&dts)
 *     else:
 */
      pandas_datetime_to_datetimestruct(__pyx_t_22, PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2287
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)
 *             result[i] = _normalized_stamp(&dts)             # <<<<<<<<<<<<<<
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 */
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts));
      __pyx_L7_continue:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2290
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)             # <<<<<<<<<<<<<<
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 */
    __pyx_t_20 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_18 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
    if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_24 = ((PyArrayObject *)__pyx_t_18);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_25); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_27);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_25, __pyx_t_26, __pyx_t_27);
        }
      }
      __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_24 = 0;
    __pyx_v_trans = ((PyArrayObject *)__pyx_t_18);
    __pyx_t_18 = 0;

    /* "pandas/tslib.pyx":2291
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)             # <<<<<<<<<<<<<<
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:
 */
    __pyx_t_18 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_20 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
    if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_24 = ((PyArrayObject *)__pyx_t_20);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_25);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_27, __pyx_t_26, __pyx_t_25);
        }
      }
      __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_24 = 0;
    __pyx_v_deltas = ((PyArrayObject *)__pyx_t_20);
    __pyx_t_20 = 0;

    /* "pandas/tslib.pyx":2292
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1             # <<<<<<<<<<<<<<
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)
 */
    __pyx_t_20 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_INCREF(((PyObject *)__pyx_v_stamps));
    PyTuple_SET_ITEM(__pyx_t_19, 0, ((PyObject *)__pyx_v_stamps));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps));
    __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_18));
    if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_19), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
    __pyx_t_18 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v__pos = __pyx_t_18;
    __pyx_t_18 = 0;

    /* "pandas/tslib.pyx":2293
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:             # <<<<<<<<<<<<<<
 *             _pos = _pos.astype(np.int64)
 *         pos = _pos
 */
    __pyx_t_18 = PyObject_GetAttr(__pyx_v__pos, __pyx_n_s__dtype); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_19 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_18, __pyx_t_19, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":2294
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)             # <<<<<<<<<<<<<<
 *         pos = _pos
 * 
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v__pos, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_18 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__int64); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_18);
      __pyx_t_18 = 0;
      __pyx_t_18 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_v__pos);
      __pyx_v__pos = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "pandas/tslib.pyx":2295
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)
 *         pos = _pos             # <<<<<<<<<<<<<<
 * 
 *         # statictzinfo
 */
    if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_24 = ((PyArrayObject *)__pyx_v__pos);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_25); Py_XDECREF(__pyx_t_26); Py_XDECREF(__pyx_t_27);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_25, __pyx_t_26, __pyx_t_27);
        }
      }
      __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_24 = 0;
    __Pyx_INCREF(__pyx_v__pos);
    __pyx_v_pos = ((PyArrayObject *)__pyx_v__pos);

    /* "pandas/tslib.pyx":2298
 * 
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 */
    __pyx_t_18 = ((PyObject *)__pyx_n_s___transition_info);
    __Pyx_INCREF(__pyx_t_18);
    __pyx_t_8 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_18); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __pyx_t_28 = (!__pyx_t_8);
    if (__pyx_t_28) {

      /* "pandas/tslib.pyx":2299
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
        __pyx_v_i = __pyx_t_9;

        /* "pandas/tslib.pyx":2300
 *         if not hasattr(tz, '_transition_info'):
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     result[i] = NPY_NAT
 *                     continue
 */
        __pyx_t_29 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_29 < 0) {
          __pyx_t_29 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_29 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_28) {

          /* "pandas/tslib.pyx":2301
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 */
          __pyx_t_30 = __pyx_v_i;
          __pyx_t_11 = -1;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_11 = 0;
          } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
          if (unlikely(__pyx_t_11 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_11);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

          /* "pandas/tslib.pyx":2302
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 *                     continue             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)
 */
          goto __pyx_L12_continue;
          goto __pyx_L14;
        }
        __pyx_L14:;

        /* "pandas/tslib.pyx":2303
 *                     result[i] = NPY_NAT
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],             # <<<<<<<<<<<<<<
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = _normalized_stamp(&dts)
 */
        __pyx_t_31 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_31 < 0) {
          __pyx_t_31 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_31 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_32 = 0;
        __pyx_t_11 = -1;
        if (__pyx_t_32 < 0) {
          __pyx_t_32 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_32 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2304
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 result[i] = _normalized_stamp(&dts)
 *         else:
 */
        pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2305
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = _normalized_stamp(&dts)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(n):
 */
        __pyx_t_33 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_33 < 0) {
          __pyx_t_33 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_33 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts));
        __pyx_L12_continue:;
      }
      goto __pyx_L11;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2307
 *                 result[i] = _normalized_stamp(&dts)
 *         else:
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
        __pyx_v_i = __pyx_t_9;

        /* "pandas/tslib.pyx":2308
 *         else:
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     result[i] = NPY_NAT
 *                     continue
 */
        __pyx_t_34 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_34 < 0) {
          __pyx_t_34 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_34 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_28) {

          /* "pandas/tslib.pyx":2309
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 */
          __pyx_t_35 = __pyx_v_i;
          __pyx_t_11 = -1;
          if (__pyx_t_35 < 0) {
            __pyx_t_35 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_35 < 0)) __pyx_t_11 = 0;
          } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
          if (unlikely(__pyx_t_11 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_11);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

          /* "pandas/tslib.pyx":2310
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 *                     continue             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)
 */
          goto __pyx_L15_continue;
          goto __pyx_L17;
        }
        __pyx_L17:;

        /* "pandas/tslib.pyx":2311
 *                     result[i] = NPY_NAT
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],             # <<<<<<<<<<<<<<
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = _normalized_stamp(&dts)
 */
        __pyx_t_36 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_36 < 0) {
          __pyx_t_36 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_36 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_37 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_37 < 0) {
          __pyx_t_37 += __pyx_pybuffernd_pos.diminfo[0].shape;
          if (unlikely(__pyx_t_37 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_38 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_pos.diminfo[0].strides));
        __pyx_t_11 = -1;
        if (__pyx_t_38 < 0) {
          __pyx_t_38 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_38 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2312
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 result[i] = _normalized_stamp(&dts)
 * 
 */
        pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2313
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = _normalized_stamp(&dts)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __pyx_t_39 = __pyx_v_i;
        __pyx_t_11 = -1;
        if (__pyx_t_39 < 0) {
          __pyx_t_39 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_39 < 0)) __pyx_t_11 = 0;
        } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_11 = 0;
        if (unlikely(__pyx_t_11 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_11);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_5tslib__normalized_stamp((&__pyx_v_dts));
        __pyx_L15_continue:;
      }
    }
    __pyx_L11:;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2315
 *                 result[i] = _normalized_stamp(&dts)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib._normalize_local", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_trans);
  __Pyx_XDECREF((PyObject *)__pyx_v_deltas);
  __Pyx_XDECREF((PyObject *)__pyx_v_pos);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v__pos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2317
 *     return result
 * 
 * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     dts.hour = 0
 *     dts.min = 0
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib__normalized_stamp(pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_normalized_stamp", 0);

  /* "pandas/tslib.pyx":2318
 * 
 * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts):
 *     dts.hour = 0             # <<<<<<<<<<<<<<
 *     dts.min = 0
 *     dts.sec = 0
 */
  __pyx_v_dts->hour = 0;

  /* "pandas/tslib.pyx":2319
 * cdef inline int64_t _normalized_stamp(pandas_datetimestruct *dts):
 *     dts.hour = 0
 *     dts.min = 0             # <<<<<<<<<<<<<<
 *     dts.sec = 0
 *     dts.us = 0
 */
  __pyx_v_dts->min = 0;

  /* "pandas/tslib.pyx":2320
 *     dts.hour = 0
 *     dts.min = 0
 *     dts.sec = 0             # <<<<<<<<<<<<<<
 *     dts.us = 0
 *     dts.ps = 0
 */
  __pyx_v_dts->sec = 0;

  /* "pandas/tslib.pyx":2321
 *     dts.min = 0
 *     dts.sec = 0
 *     dts.us = 0             # <<<<<<<<<<<<<<
 *     dts.ps = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_v_dts->us = 0;

  /* "pandas/tslib.pyx":2322
 *     dts.sec = 0
 *     dts.us = 0
 *     dts.ps = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;

  /* "pandas/tslib.pyx":2323
 *     dts.us = 0
 *     dts.ps = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2326
 * 
 * 
 * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz):             # <<<<<<<<<<<<<<
 *     tso.value = stamp
 *     pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts)
 */

static CYTHON_INLINE void __pyx_f_6pandas_5tslib_m8_populate_tsobject(__pyx_t_5numpy_int64_t __pyx_v_stamp, struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_tso, PyObject *__pyx_v_tz) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("m8_populate_tsobject", 0);

  /* "pandas/tslib.pyx":2327
 * 
 * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz):
 *     tso.value = stamp             # <<<<<<<<<<<<<<
 *     pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts)
 * 
 */
  __pyx_v_tso->value = __pyx_v_stamp;

  /* "pandas/tslib.pyx":2328
 * cdef inline void m8_populate_tsobject(int64_t stamp, _TSObject tso, object tz):
 *     tso.value = stamp
 *     pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts)             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
  pandas_datetime_to_datetimestruct(__pyx_v_tso->value, PANDAS_FR_ns, (&__pyx_v_tso->dts));

  /* "pandas/tslib.pyx":2330
 *     pandas_datetime_to_datetimestruct(tso.value, PANDAS_FR_ns, &tso.dts)
 * 
 *     if tz is not None:             # <<<<<<<<<<<<<<
 *         _localize_tso(tso, tz)
 * 
 */
  __pyx_t_1 = (__pyx_v_tz != Py_None);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2331
 * 
 *     if tz is not None:
 *         _localize_tso(tso, tz)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_f_6pandas_5tslib__localize_tso(__pyx_v_tso, __pyx_v_tz);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_67dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_67dates_normalized = {__Pyx_NAMESTR("dates_normalized"), (PyCFunction)__pyx_pw_6pandas_5tslib_67dates_normalized, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_67dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_stamps = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dates_normalized (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stamps,&__pyx_n_s__tz,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":2334
 * 
 * 
 * def dates_normalized(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stamps)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dates_normalized") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __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_stamps = ((PyArrayObject *)values[0]);
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dates_normalized", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.dates_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_66dates_normalized(__pyx_self, __pyx_v_stamps, __pyx_v_tz);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_66dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  pandas_datetimestruct __pyx_v_dts;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_trans = NULL;
  PyObject *__pyx_v_deltas = NULL;
  PyObject *__pyx_v_pos = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_inf = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  npy_datetime __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dates_normalized", 0);
  __pyx_pybuffer_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2336
 * def dates_normalized(ndarray[int64_t] stamps, tz=None):
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)             # <<<<<<<<<<<<<<
 *         pandas_datetimestruct dts
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2339
 *         pandas_datetimestruct dts
 * 
 *     if tz is None or _is_utc(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
  __pyx_t_2 = (__pyx_v_tz == Py_None);
  if (!__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2340
 * 
 *     if tz is None or _is_utc(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pandas/tslib.pyx":2341
 *     if tz is None or _is_utc(tz):
 *         for i in range(n):
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 *                 return False
 */
      __pyx_t_6 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_6 < 0) {
        __pyx_t_6 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2342
 *         for i in range(n):
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:             # <<<<<<<<<<<<<<
 *                 return False
 *     elif _is_tzlocal(tz):
 */
      __pyx_t_4 = ((((__pyx_v_dts.hour + __pyx_v_dts.min) + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2343
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 *                 return False             # <<<<<<<<<<<<<<
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L0;
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2344
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 *                 return False
 *     elif _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2345
 *                 return False
 *     elif _is_tzlocal(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             if (dts.min + dts.sec + dts.us) > 0:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pandas/tslib.pyx":2346
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             if (dts.min + dts.sec + dts.us) > 0:
 *                 return False
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2347
 *         for i in range(n):
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             if (dts.min + dts.sec + dts.us) > 0:             # <<<<<<<<<<<<<<
 *                 return False
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min,
 */
      __pyx_t_4 = (((__pyx_v_dts.min + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2348
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             if (dts.min + dts.sec + dts.us) > 0:
 *                 return False             # <<<<<<<<<<<<<<
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min,
 *                           dts.sec, dts.us, tz)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_10 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_r = __pyx_t_10;
        __pyx_t_10 = 0;
        goto __pyx_L0;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "pandas/tslib.pyx":2349
 *             if (dts.min + dts.sec + dts.us) > 0:
 *                 return False
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min,             # <<<<<<<<<<<<<<
 *                           dts.sec, dts.us, tz)
 *             dt = dt + tz.utcoffset(dt)
 */
      __pyx_t_10 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_12 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);

      /* "pandas/tslib.pyx":2350
 *                 return False
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min,
 *                           dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *             dt = dt + tz.utcoffset(dt)
 *             if dt.hour > 0:
 */
      __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_10 = 0;
      __pyx_t_9 = 0;
      __pyx_t_8 = 0;
      __pyx_t_12 = 0;
      __pyx_t_13 = 0;
      __pyx_t_14 = 0;
      __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_v_dt);
      __pyx_v_dt = __pyx_t_15;
      __pyx_t_15 = 0;

      /* "pandas/tslib.pyx":2351
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour, dts.min,
 *                           dts.sec, dts.us, tz)
 *             dt = dt + tz.utcoffset(dt)             # <<<<<<<<<<<<<<
 *             if dt.hour > 0:
 *                 return False
 */
      __pyx_t_15 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s__utcoffset); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_INCREF(__pyx_v_dt);
      PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_dt);
      __Pyx_GIVEREF(__pyx_v_dt);
      __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
      __pyx_t_16 = PyNumber_Add(__pyx_v_dt, __pyx_t_14); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_v_dt);
      __pyx_v_dt = __pyx_t_16;
      __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":2352
 *                           dts.sec, dts.us, tz)
 *             dt = dt + tz.utcoffset(dt)
 *             if dt.hour > 0:             # <<<<<<<<<<<<<<
 *                 return False
 *     else:
 */
      __pyx_t_16 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__hour); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_14 = PyObject_RichCompare(__pyx_t_16, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2353
 *             dt = dt + tz.utcoffset(dt)
 *             if dt.hour > 0:
 *                 return False             # <<<<<<<<<<<<<<
 *     else:
 *         trans = _get_transitions(tz)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_14 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_r = __pyx_t_14;
        __pyx_t_14 = 0;
        goto __pyx_L0;
        goto __pyx_L10;
      }
      __pyx_L10:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2355
 *                 return False
 *     else:
 *         trans = _get_transitions(tz)             # <<<<<<<<<<<<<<
 *         deltas = _get_deltas(tz)
 *         for i in range(n):
 */
    __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_15 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
    __pyx_v_trans = __pyx_t_15;
    __pyx_t_15 = 0;

    /* "pandas/tslib.pyx":2356
 *     else:
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             # Adjust datetime64 timestamp, recompute datetimestruct
 */
    __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
    __pyx_v_deltas = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "pandas/tslib.pyx":2357
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             # Adjust datetime64 timestamp, recompute datetimestruct
 *             pos = trans.searchsorted(stamps[i]) - 1
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pandas/tslib.pyx":2359
 *         for i in range(n):
 *             # Adjust datetime64 timestamp, recompute datetimestruct
 *             pos = trans.searchsorted(stamps[i]) - 1             # <<<<<<<<<<<<<<
 *             inf = tz._transition_info[pos]
 * 
 */
      __pyx_t_14 = PyObject_GetAttr(__pyx_v_trans, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __pyx_t_15 = PyNumber_Subtract(__pyx_t_16, __pyx_int_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_v_pos);
      __pyx_v_pos = __pyx_t_15;
      __pyx_t_15 = 0;

      /* "pandas/tslib.pyx":2360
 *             # Adjust datetime64 timestamp, recompute datetimestruct
 *             pos = trans.searchsorted(stamps[i]) - 1
 *             inf = tz._transition_info[pos]             # <<<<<<<<<<<<<<
 * 
 *             pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos],
 */
      __pyx_t_15 = PyObject_GetAttr(__pyx_v_tz, __pyx_n_s___transition_info); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyObject_GetItem(__pyx_t_15, __pyx_v_pos); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_v_inf);
      __pyx_v_inf = __pyx_t_16;
      __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":2362
 *             inf = tz._transition_info[pos]
 * 
 *             pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos],             # <<<<<<<<<<<<<<
 *                                               PANDAS_FR_ns, &dts)
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = PyObject_GetItem(__pyx_v_deltas, __pyx_v_pos); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_19 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_14); if (unlikely((__pyx_t_19 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "pandas/tslib.pyx":2363
 * 
 *             pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos],
 *                                               PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 *                 return False
 */
      pandas_datetime_to_datetimestruct(__pyx_t_19, PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2364
 *             pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos],
 *                                               PANDAS_FR_ns, &dts)
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __pyx_t_4 = ((((__pyx_v_dts.hour + __pyx_v_dts.min) + __pyx_v_dts.sec) + __pyx_v_dts.us) > 0);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2365
 *                                               PANDAS_FR_ns, &dts)
 *             if (dts.hour + dts.min + dts.sec + dts.us) > 0:
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *     return True
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_14 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_r = __pyx_t_14;
        __pyx_t_14 = 0;
        goto __pyx_L0;
        goto __pyx_L13;
      }
      __pyx_L13:;
    }
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2367
 *                 return False
 * 
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # Some general helper functions
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_14 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_r = __pyx_t_14;
  __pyx_t_14 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.dates_normalized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_trans);
  __Pyx_XDECREF(__pyx_v_deltas);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_v_inf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_69isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_69isleapyear = {__Pyx_NAMESTR("isleapyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_69isleapyear, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_69isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year) {
  __pyx_t_5numpy_int64_t __pyx_v_year;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isleapyear (wrapper)", 0);
  assert(__pyx_arg_year); {
    __pyx_v_year = __Pyx_PyInt_from_py_npy_int64(__pyx_arg_year); if (unlikely((__pyx_v_year == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.isleapyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_68isleapyear(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_year));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2372
 * #----------------------------------------------------------------------
 * 
 * def isleapyear(int64_t year):             # <<<<<<<<<<<<<<
 *     return is_leapyear(year)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_68isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isleapyear", 0);

  /* "pandas/tslib.pyx":2373
 * 
 * def isleapyear(int64_t year):
 *     return is_leapyear(year)             # <<<<<<<<<<<<<<
 * 
 * def monthrange(int64_t year, int64_t month):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(is_leapyear(__pyx_v_year)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_71monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_71monthrange = {__Pyx_NAMESTR("monthrange"), (PyCFunction)__pyx_pw_6pandas_5tslib_71monthrange, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_71monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_year;
  __pyx_t_5numpy_int64_t __pyx_v_month;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("monthrange (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__year,&__pyx_n_s__month,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__year)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__month)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("monthrange", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monthrange") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __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_year = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_year == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_month = __Pyx_PyInt_from_py_npy_int64(values[1]); if (unlikely((__pyx_v_month == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("monthrange", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.monthrange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_70monthrange(__pyx_self, __pyx_v_year, __pyx_v_month);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2375
 *     return is_leapyear(year)
 * 
 * def monthrange(int64_t year, int64_t month):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t days
 */

static PyObject *__pyx_pf_6pandas_5tslib_70monthrange(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year, __pyx_t_5numpy_int64_t __pyx_v_month) {
  __pyx_t_5numpy_int64_t __pyx_v_days;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("monthrange", 0);

  /* "pandas/tslib.pyx":2380
 *         int64_t day_of_week
 * 
 *     if month < 1 or month > 12:             # <<<<<<<<<<<<<<
 *         raise ValueError("bad month number 0; must be 1-12")
 * 
 */
  __pyx_t_1 = (__pyx_v_month < 1);
  if (!__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_month > 12);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":2381
 * 
 *     if month < 1 or month > 12:
 *         raise ValueError("bad month number 0; must be 1-12")             # <<<<<<<<<<<<<<
 * 
 *     days = days_per_month_table[is_leapyear(year)][month-1]
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_118), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2383
 *         raise ValueError("bad month number 0; must be 1-12")
 * 
 *     days = days_per_month_table[is_leapyear(year)][month-1]             # <<<<<<<<<<<<<<
 * 
 *     return (dayofweek(year, month, 1), days)
 */
  __pyx_v_days = ((days_per_month_table[is_leapyear(__pyx_v_year)])[(__pyx_v_month - 1)]);

  /* "pandas/tslib.pyx":2385
 *     days = days_per_month_table[is_leapyear(year)][month-1]
 * 
 *     return (dayofweek(year, month, 1), days)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t ts_dayofweek(_TSObject ts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyInt_FromLong(dayofweek(__pyx_v_year, __pyx_v_month, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_days); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __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);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2387
 *     return (dayofweek(year, month, 1), days)
 * 
 * cdef inline int64_t ts_dayofweek(_TSObject ts):             # <<<<<<<<<<<<<<
 *     return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day)
 * 
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_ts_dayofweek(struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ts_dayofweek", 0);

  /* "pandas/tslib.pyx":2388
 * 
 * cdef inline int64_t ts_dayofweek(_TSObject ts):
 *     return dayofweek(ts.dts.year, ts.dts.month, ts.dts.day)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = dayofweek(__pyx_v_ts->dts.year, __pyx_v_ts->dts.month, __pyx_v_ts->dts.day);
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2391
 * 
 * 
 * cpdef normalize_date(object dt):             # <<<<<<<<<<<<<<
 *     '''
 *     Normalize datetime.datetime value to midnight. Returns datetime.date as a
 */

static PyObject *__pyx_pw_6pandas_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_normalize_date(PyObject *__pyx_v_dt, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalize_date", 0);

  /* "pandas/tslib.pyx":2400
 *     normalized : datetime.datetime or Timestamp
 *     '''
 *     if PyDateTime_Check(dt):             # <<<<<<<<<<<<<<
 *         return dt.replace(hour=0, minute=0, second=0, microsecond=0)
 *     elif PyDate_Check(dt):
 */
  __pyx_t_1 = PyDateTime_Check(__pyx_v_dt);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2401
 *     '''
 *     if PyDateTime_Check(dt):
 *         return dt.replace(hour=0, minute=0, second=0, microsecond=0)             # <<<<<<<<<<<<<<
 *     elif PyDate_Check(dt):
 *         return datetime(dt.year, dt.month, dt.day)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__hour), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__minute), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__second), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__microsecond), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2402
 *     if PyDateTime_Check(dt):
 *         return dt.replace(hour=0, minute=0, second=0, microsecond=0)
 *     elif PyDate_Check(dt):             # <<<<<<<<<<<<<<
 *         return datetime(dt.year, dt.month, dt.day)
 *     else:
 */
  __pyx_t_1 = PyDate_Check(__pyx_v_dt);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2403
 *         return dt.replace(hour=0, minute=0, second=0, microsecond=0)
 *     elif PyDate_Check(dt):
 *         return datetime(dt.year, dt.month, dt.day)             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('Unrecognized type: %s' % type(dt))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__month); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_dt, __pyx_n_s__day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __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);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2405
 *         return datetime(dt.year, dt.month, dt.day)
 *     else:
 *         raise TypeError('Unrecognized type: %s' % type(dt))             # <<<<<<<<<<<<<<
 * 
 * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps,
 */
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_119), ((PyObject *)Py_TYPE(__pyx_v_dt))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib.normalize_date", __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_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5tslib_72normalize_date[] = "\n    Normalize datetime.datetime value to midnight. Returns datetime.date as a\n    datetime.datetime at midnight\n\n    Returns\n    -------\n    normalized : datetime.datetime or Timestamp\n    ";
static PyObject *__pyx_pw_6pandas_5tslib_73normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize_date (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_72normalize_date(__pyx_self, ((PyObject *)__pyx_v_dt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2391
 * 
 * 
 * cpdef normalize_date(object dt):             # <<<<<<<<<<<<<<
 *     '''
 *     Normalize datetime.datetime value to midnight. Returns datetime.date as a
 */

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

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

/* "pandas/tslib.pyx":2407
 *         raise TypeError('Unrecognized type: %s' % type(dt))
 * 
 * cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps,             # <<<<<<<<<<<<<<
 *                                                  int freq, object tz):
 *     cdef:
 */

static PyArrayObject *__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(PyArrayObject *__pyx_v_stamps, int __pyx_v_freq, PyObject *__pyx_v_tz) {
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_trans = 0;
  PyArrayObject *__pyx_v_deltas = 0;
  PyArrayObject *__pyx_v_pos = 0;
  pandas_datetimestruct __pyx_v_dts;
  Py_ssize_t __pyx_v_i;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_v__pos = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas;
  __Pyx_Buffer __pyx_pybuffer_deltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos;
  __Pyx_Buffer __pyx_pybuffer_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_trans;
  __Pyx_Buffer __pyx_pybuffer_trans;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_int64_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  Py_ssize_t __pyx_t_23;
  npy_datetime __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  PyArrayObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  long __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  __pyx_t_5numpy_int64_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("localize_dt64arr_to_period", 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_trans.pybuffer.buf = NULL;
  __pyx_pybuffer_trans.refcount = 0;
  __pyx_pybuffernd_trans.data = NULL;
  __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans;
  __pyx_pybuffer_deltas.pybuffer.buf = NULL;
  __pyx_pybuffer_deltas.refcount = 0;
  __pyx_pybuffernd_deltas.data = NULL;
  __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas;
  __pyx_pybuffer_pos.pybuffer.buf = NULL;
  __pyx_pybuffer_pos.refcount = 0;
  __pyx_pybuffernd_pos.data = NULL;
  __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos;
  __pyx_pybuffer_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2410
 *                                                  int freq, object tz):
 *     cdef:
 *         Py_ssize_t n = len(stamps)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] result = np.empty(n, dtype=np.int64)
 *         ndarray[int64_t] trans, deltas, pos
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2411
 *     cdef:
 *         Py_ssize_t n = len(stamps)
 *         ndarray[int64_t] result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] trans, deltas, pos
 *         pandas_datetimestruct dts
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __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_int64_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[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":2415
 *         pandas_datetimestruct dts
 * 
 *     if not have_pytz:             # <<<<<<<<<<<<<<
 *         raise Exception('Could not find pytz module')
 * 
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__have_pytz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_9 = (!__pyx_t_8);
  if (__pyx_t_9) {

    /* "pandas/tslib.pyx":2416
 * 
 *     if not have_pytz:
 *         raise Exception('Could not find pytz module')             # <<<<<<<<<<<<<<
 * 
 *     if _is_utc(tz):
 */
    __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_120), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2418
 *         raise Exception('Could not find pytz module')
 * 
 *     if _is_utc(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 */
  __pyx_t_9 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
  if (__pyx_t_9) {

    /* "pandas/tslib.pyx":2419
 * 
 *     if _is_utc(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/tslib.pyx":2420
 *     if _is_utc(tz):
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 result[i] = NPY_NAT
 *                 continue
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_9) {

        /* "pandas/tslib.pyx":2421
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
        __pyx_t_13 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_13 < 0) {
          __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2421; __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_v_6pandas_5tslib_NPY_NAT;

        /* "pandas/tslib.pyx":2422
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 */
        goto __pyx_L5_continue;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "pandas/tslib.pyx":2423
 *                 result[i] = NPY_NAT
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2425
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)             # <<<<<<<<<<<<<<
 * 
 *     elif _is_tzlocal(tz):
 */
      __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/tslib.pyx":2424
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,             # <<<<<<<<<<<<<<
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15;
      __pyx_L5_continue:;
    }
    goto __pyx_L4;
  }

  /* "pandas/tslib.pyx":2427
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 * 
 *     elif _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "pandas/tslib.pyx":2428
 * 
 *     elif _is_tzlocal(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "pandas/tslib.pyx":2429
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 result[i] = NPY_NAT
 *                 continue
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_9) {

        /* "pandas/tslib.pyx":2430
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 */
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_18 < 0) {
          __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_18 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

        /* "pandas/tslib.pyx":2431
 *             if stamps[i] == NPY_NAT:
 *                 result[i] = NPY_NAT
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)
 */
        goto __pyx_L8_continue;
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "pandas/tslib.pyx":2432
 *                 result[i] = NPY_NAT
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,             # <<<<<<<<<<<<<<
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "pandas/tslib.pyx":2433
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)             # <<<<<<<<<<<<<<
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 */
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2434
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 */
      __pyx_t_4 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":2435
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 */
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_20 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_21 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_22 = PyTuple_New(8); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_22);
      PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_22, 4, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_22, 5, __pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_22, 6, __pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_21);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_22, 7, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_4 = 0;
      __pyx_t_2 = 0;
      __pyx_t_6 = 0;
      __pyx_t_3 = 0;
      __pyx_t_5 = 0;
      __pyx_t_20 = 0;
      __pyx_t_21 = 0;
      __pyx_t_21 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
      __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_21);
      __pyx_t_21 = 0;

      /* "pandas/tslib.pyx":2436
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)
 */
      __pyx_t_21 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_22 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_21)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_22);
      __Pyx_GIVEREF(__pyx_t_22);
      __pyx_t_22 = 0;
      __pyx_t_22 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;
      __pyx_t_21 = PyNumber_Multiply(__pyx_t_22, __pyx_int_1000000000); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_v_delta);
      __pyx_v_delta = __pyx_t_21;
      __pyx_t_21 = 0;

      /* "pandas/tslib.pyx":2437
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,             # <<<<<<<<<<<<<<
 *                                               PANDAS_FR_ns, &dts)
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 */
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_21 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_22 = PyNumber_Add(__pyx_t_21, __pyx_v_delta); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_24 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_22); if (unlikely((__pyx_t_24 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

      /* "pandas/tslib.pyx":2438
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 */
      pandas_datetime_to_datetimestruct(__pyx_t_24, PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2440
 *                                               PANDAS_FR_ns, &dts)
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)             # <<<<<<<<<<<<<<
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 */
      __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/tslib.pyx":2439
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)
 *             result[i] = get_period_ordinal(dts.year, dts.month, dts.day,             # <<<<<<<<<<<<<<
 *                                            dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 *     else:
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_t_12 = -1;
      if (__pyx_t_25 < 0) {
        __pyx_t_25 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_25 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15;
      __pyx_L8_continue:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2443
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)             # <<<<<<<<<<<<<<
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 */
    __pyx_t_22 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_22);
    __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_20 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;
    if (!(likely(((__pyx_t_20) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_20, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_26 = ((PyArrayObject *)__pyx_t_20);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_27, __pyx_t_28, __pyx_t_29);
        }
      }
      __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_26 = 0;
    __pyx_v_trans = ((PyArrayObject *)__pyx_t_20);
    __pyx_t_20 = 0;

    /* "pandas/tslib.pyx":2444
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)             # <<<<<<<<<<<<<<
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:
 */
    __pyx_t_20 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_22 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_22);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;
    if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_26 = ((PyArrayObject *)__pyx_t_22);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_29); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_27);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_29, __pyx_t_28, __pyx_t_27);
        }
      }
      __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_26 = 0;
    __pyx_v_deltas = ((PyArrayObject *)__pyx_t_22);
    __pyx_t_22 = 0;

    /* "pandas/tslib.pyx":2445
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1             # <<<<<<<<<<<<<<
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)
 */
    __pyx_t_22 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_22);
    __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_INCREF(((PyObject *)__pyx_v_stamps));
    PyTuple_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_v_stamps));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps));
    __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_20));
    if (PyDict_SetItem(__pyx_t_20, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_21), ((PyObject *)__pyx_t_20)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
    __pyx_t_20 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v__pos = __pyx_t_20;
    __pyx_t_20 = 0;

    /* "pandas/tslib.pyx":2446
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:             # <<<<<<<<<<<<<<
 *             _pos = _pos.astype(np.int64)
 *         pos = _pos
 */
    __pyx_t_20 = PyObject_GetAttr(__pyx_v__pos, __pyx_n_s__dtype); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_21 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_20, __pyx_t_21, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_9) {

      /* "pandas/tslib.pyx":2447
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)             # <<<<<<<<<<<<<<
 *         pos = _pos
 * 
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v__pos, __pyx_n_s__astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_21 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_20 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s__int64); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      __pyx_t_20 = 0;
      __pyx_t_20 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_21), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;
      __Pyx_DECREF(__pyx_v__pos);
      __pyx_v__pos = __pyx_t_20;
      __pyx_t_20 = 0;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "pandas/tslib.pyx":2448
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)
 *         pos = _pos             # <<<<<<<<<<<<<<
 * 
 *         # statictzinfo
 */
    if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_26 = ((PyArrayObject *)__pyx_v__pos);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_12 < 0)) {
        PyErr_Fetch(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_27); Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_27, __pyx_t_28, __pyx_t_29);
        }
      }
      __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_26 = 0;
    __Pyx_INCREF(__pyx_v__pos);
    __pyx_v_pos = ((PyArrayObject *)__pyx_v__pos);

    /* "pandas/tslib.pyx":2451
 * 
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 */
    __pyx_t_20 = ((PyObject *)__pyx_n_s___transition_info);
    __Pyx_INCREF(__pyx_t_20);
    __pyx_t_9 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_20); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __pyx_t_8 = (!__pyx_t_9);
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":2452
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
        __pyx_v_i = __pyx_t_10;

        /* "pandas/tslib.pyx":2453
 *         if not hasattr(tz, '_transition_info'):
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     result[i] = NPY_NAT
 *                     continue
 */
        __pyx_t_30 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_30 < 0) {
          __pyx_t_30 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_30 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_8) {

          /* "pandas/tslib.pyx":2454
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 */
          __pyx_t_31 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

          /* "pandas/tslib.pyx":2455
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 *                     continue             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)
 */
          goto __pyx_L13_continue;
          goto __pyx_L15;
        }
        __pyx_L15:;

        /* "pandas/tslib.pyx":2456
 *                     result[i] = NPY_NAT
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],             # <<<<<<<<<<<<<<
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 */
        __pyx_t_32 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_32 < 0) {
          __pyx_t_32 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_32 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_33 = 0;
        __pyx_t_12 = -1;
        if (__pyx_t_33 < 0) {
          __pyx_t_33 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_33 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2457
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 */
        pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2459
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(n):
 */
        __pyx_t_15 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_15 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/tslib.pyx":2458
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,             # <<<<<<<<<<<<<<
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 *         else:
 */
        __pyx_t_34 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_34 < 0) {
          __pyx_t_34 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_34 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_15;
        __pyx_L13_continue:;
      }
      goto __pyx_L12;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2461
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 *         else:
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
        __pyx_v_i = __pyx_t_10;

        /* "pandas/tslib.pyx":2462
 *         else:
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     result[i] = NPY_NAT
 *                     continue
 */
        __pyx_t_35 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_35 < 0) {
          __pyx_t_35 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_35 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_8) {

          /* "pandas/tslib.pyx":2463
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT             # <<<<<<<<<<<<<<
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 */
          __pyx_t_36 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_36 < 0) {
            __pyx_t_36 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_36 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
          if (unlikely(__pyx_t_12 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_12);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_6pandas_5tslib_NPY_NAT;

          /* "pandas/tslib.pyx":2464
 *                 if stamps[i] == NPY_NAT:
 *                     result[i] = NPY_NAT
 *                     continue             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)
 */
          goto __pyx_L16_continue;
          goto __pyx_L18;
        }
        __pyx_L18:;

        /* "pandas/tslib.pyx":2465
 *                     result[i] = NPY_NAT
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],             # <<<<<<<<<<<<<<
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 */
        __pyx_t_37 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_37 < 0) {
          __pyx_t_37 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_37 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_38 < 0) {
          __pyx_t_38 += __pyx_pybuffernd_pos.diminfo[0].shape;
          if (unlikely(__pyx_t_38 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_15 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_pos.diminfo[0].strides));
        __pyx_t_12 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2466
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 */
        pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2468
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __pyx_t_39 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_39 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/tslib.pyx":2467
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)
 *                 result[i] = get_period_ordinal(dts.year, dts.month, dts.day,             # <<<<<<<<<<<<<<
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 * 
 */
        __pyx_t_40 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_40 < 0) {
          __pyx_t_40 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_40 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_12 = 0;
        if (unlikely(__pyx_t_12 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_12);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_39;
        __pyx_L16_continue:;
      }
    }
    __pyx_L12:;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":2470
 *                                                dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyArrayObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.localize_dt64arr_to_period", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_trans);
  __Pyx_XDECREF((PyObject *)__pyx_v_deltas);
  __Pyx_XDECREF((PyObject *)__pyx_v_pos);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v__pos);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2534
 * #----------------------------------------------------------------------
 * 
 * cdef inline int64_t apply_mult(int64_t period_ord, int64_t mult):             # <<<<<<<<<<<<<<
 *     """
 *     Get freq+multiple ordinal value from corresponding freq-only ordinal value.
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_apply_mult(__pyx_t_5numpy_int64_t __pyx_v_period_ord, __pyx_t_5numpy_int64_t __pyx_v_mult) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __pyx_t_5numpy_int64_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_mult", 0);

  /* "pandas/tslib.pyx":2540
 *     integer).
 *     """
 *     if mult == 1:             # <<<<<<<<<<<<<<
 *         return period_ord
 * 
 */
  __pyx_t_1 = (__pyx_v_mult == 1);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2541
 *     """
 *     if mult == 1:
 *         return period_ord             # <<<<<<<<<<<<<<
 * 
 *     return (period_ord - 1) // mult
 */
    __pyx_r = __pyx_v_period_ord;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2543
 *         return period_ord
 * 
 *     return (period_ord - 1) // mult             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult):
 */
  __pyx_t_2 = (__pyx_v_period_ord - 1);
  if (unlikely(__pyx_v_mult == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  else if (sizeof(__pyx_t_5numpy_int64_t) == sizeof(long) && unlikely(__pyx_v_mult == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_2))) {
    PyErr_Format(PyExc_OverflowError, "value too large to perform division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_r = __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_2, __pyx_v_mult);
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2545
 *     return (period_ord - 1) // mult
 * 
 * cdef inline int64_t remove_mult(int64_t period_ord_w_mult, int64_t mult):             # <<<<<<<<<<<<<<
 *     """
 *     Get freq-only ordinal value from corresponding freq+multiple ordinal.
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_remove_mult(__pyx_t_5numpy_int64_t __pyx_v_period_ord_w_mult, __pyx_t_5numpy_int64_t __pyx_v_mult) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("remove_mult", 0);

  /* "pandas/tslib.pyx":2549
 *     Get freq-only ordinal value from corresponding freq+multiple ordinal.
 *     """
 *     if mult == 1:             # <<<<<<<<<<<<<<
 *         return period_ord_w_mult
 * 
 */
  __pyx_t_1 = (__pyx_v_mult == 1);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2550
 *     """
 *     if mult == 1:
 *         return period_ord_w_mult             # <<<<<<<<<<<<<<
 * 
 *     return period_ord_w_mult * mult + 1;
 */
    __pyx_r = __pyx_v_period_ord_w_mult;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2552
 *         return period_ord_w_mult
 * 
 *     return period_ord_w_mult * mult + 1;             # <<<<<<<<<<<<<<
 * 
 * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None):
 */
  __pyx_r = ((__pyx_v_period_ord_w_mult * __pyx_v_mult) + 1);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_74dt64arr_to_periodarr[] = "\n    Convert array of datetime64 values (passed in as 'i8' dtype) to a set of\n    periods corresponding to desired frequency, per period convention.\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_75dt64arr_to_periodarr = {__Pyx_NAMESTR("dt64arr_to_periodarr"), (PyCFunction)__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_74dt64arr_to_periodarr)};
static PyObject *__pyx_pw_6pandas_5tslib_75dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_dtarr = 0;
  int __pyx_v_freq;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dt64arr_to_periodarr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dtarr,&__pyx_n_s__freq,&__pyx_n_s__tz,0};
    PyObject* values[3] = {0,0,0};

    /* "pandas/tslib.pyx":2554
 *     return period_ord_w_mult * mult + 1;
 * 
 * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None):             # <<<<<<<<<<<<<<
 *     """
 *     Convert array of datetime64 values (passed in as 'i8' dtype) to a set of
 */
    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__dtarr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dt64arr_to_periodarr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dt64arr_to_periodarr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __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_dtarr = ((PyArrayObject *)values[0]);
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_tz = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dt64arr_to_periodarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.dt64arr_to_periodarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtarr), __pyx_ptype_5numpy_ndarray, 1, "dtarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(__pyx_self, __pyx_v_dtarr, __pyx_v_freq, __pyx_v_tz);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_74dt64arr_to_periodarr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtarr, int __pyx_v_freq, PyObject *__pyx_v_tz) {
  PyArrayObject *__pyx_v_out = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_l;
  pandas_datetimestruct __pyx_v_dts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dtarr;
  __Pyx_Buffer __pyx_pybuffer_dtarr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  __pyx_t_5numpy_int64_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_to_periodarr", 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_dtarr.pybuffer.buf = NULL;
  __pyx_pybuffer_dtarr.refcount = 0;
  __pyx_pybuffernd_dtarr.data = NULL;
  __pyx_pybuffernd_dtarr.rcbuffer = &__pyx_pybuffer_dtarr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_dtarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dtarr.diminfo[0].strides = __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dtarr.diminfo[0].shape = __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2564
 *         pandas_datetimestruct dts
 * 
 *     l = len(dtarr)             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty(l, dtype='i8')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_dtarr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_l = __pyx_t_1;

  /* "pandas/tslib.pyx":2566
 *     l = len(dtarr)
 * 
 *     out = np.empty(l, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     if tz is None:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __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_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2566; __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_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[0]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2568
 *     out = np.empty(l, dtype='i8')
 * 
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         for i in range(l):
 *             pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts)
 */
  __pyx_t_11 = (__pyx_v_tz == Py_None);
  if (__pyx_t_11) {

    /* "pandas/tslib.pyx":2569
 * 
 *     if tz is None:
 *         for i in range(l):             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts)
 *             out[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 */
    __pyx_t_1 = __pyx_v_l;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "pandas/tslib.pyx":2570
 *     if tz is None:
 *         for i in range(l):
 *             pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             out[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                         dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_dtarr.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_dtarr.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtarr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_dtarr.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2572
 *             pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts)
 *             out[i] = get_period_ordinal(dts.year, dts.month, dts.day,
 *                                         dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)             # <<<<<<<<<<<<<<
 *     else:
 *         out = localize_dt64arr_to_period(dtarr, freq, tz)
 */
      __pyx_t_14 = get_period_ordinal(__pyx_v_dts.year, __pyx_v_dts.month, __pyx_v_dts.day, __pyx_v_dts.hour, __pyx_v_dts.min, __pyx_v_dts.sec, __pyx_v_dts.us, __pyx_v_dts.ps, __pyx_v_freq); if (unlikely(__pyx_t_14 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/tslib.pyx":2571
 *         for i in range(l):
 *             pandas_datetime_to_datetimestruct(dtarr[i], PANDAS_FR_ns, &dts)
 *             out[i] = get_period_ordinal(dts.year, dts.month, dts.day,             # <<<<<<<<<<<<<<
 *                                         dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 *     else:
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_14;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2574
 *                                         dts.hour, dts.min, dts.sec, dts.us, dts.ps, freq)
 *     else:
 *         out = localize_dt64arr_to_period(dtarr, freq, tz)             # <<<<<<<<<<<<<<
 *     return out
 * 
 */
    __pyx_t_5 = ((PyObject *)__pyx_f_6pandas_5tslib_localize_dt64arr_to_period(((PyArrayObject *)__pyx_v_dtarr), __pyx_v_freq, __pyx_v_tz)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__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*)((PyArrayObject *)__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_7 < 0)) {
        PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        }
      }
      __pyx_pybuffernd_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[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(((PyObject *)__pyx_v_out));
    __pyx_v_out = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2575
 *     else:
 *         out = localize_dt64arr_to_period(dtarr, freq, tz)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_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_dtarr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.dt64arr_to_periodarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dtarr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_76periodarr_to_dt64arr[] = "\n    Convert array to datetime64 values from a set of ordinals corresponding to\n    periods per period convention.\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_77periodarr_to_dt64arr = {__Pyx_NAMESTR("periodarr_to_dt64arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_76periodarr_to_dt64arr)};
static PyObject *__pyx_pw_6pandas_5tslib_77periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_periodarr = 0;
  int __pyx_v_freq;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("periodarr_to_dt64arr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__periodarr,&__pyx_n_s__freq,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__periodarr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("periodarr_to_dt64arr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "periodarr_to_dt64arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __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_periodarr = ((PyArrayObject *)values[0]);
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("periodarr_to_dt64arr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.periodarr_to_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_periodarr), __pyx_ptype_5numpy_ndarray, 1, "periodarr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(__pyx_self, __pyx_v_periodarr, __pyx_v_freq);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2577
 *     return out
 * 
 * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq):             # <<<<<<<<<<<<<<
 *     """
 *     Convert array to datetime64 values from a set of ordinals corresponding to
 */

static PyObject *__pyx_pf_6pandas_5tslib_76periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq) {
  PyArrayObject *__pyx_v_out = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_l;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_periodarr;
  __Pyx_Buffer __pyx_pybuffer_periodarr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("periodarr_to_dt64arr", 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_periodarr.pybuffer.buf = NULL;
  __pyx_pybuffer_periodarr.refcount = 0;
  __pyx_pybuffernd_periodarr.data = NULL;
  __pyx_pybuffernd_periodarr.rcbuffer = &__pyx_pybuffer_periodarr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_periodarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_periodarr.diminfo[0].strides = __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_periodarr.diminfo[0].shape = __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2586
 *         Py_ssize_t i, l
 * 
 *     l = len(periodarr)             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty(l, dtype='i8')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_periodarr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_l = __pyx_t_1;

  /* "pandas/tslib.pyx":2588
 *     l = len(periodarr)
 * 
 *     out = np.empty(l, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(l):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __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_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_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[0]; __pyx_lineno = 2588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":2590
 *     out = np.empty(l, dtype='i8')
 * 
 *     for i in range(l):             # <<<<<<<<<<<<<<
 *         out[i] = period_ordinal_to_dt64(periodarr[i], freq)
 * 
 */
  __pyx_t_1 = __pyx_v_l;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/tslib.pyx":2591
 * 
 *     for i in range(l):
 *         out[i] = period_ordinal_to_dt64(periodarr[i], freq)             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_periodarr.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_periodarr.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_out.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5tslib_period_ordinal_to_dt64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_periodarr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_periodarr.diminfo[0].strides)), __pyx_v_freq, 0);
  }

  /* "pandas/tslib.pyx":2593
 *         out[i] = period_ordinal_to_dt64(periodarr[i], freq)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef char START = 'S'
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_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_out.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.periodarr_to_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_periodarr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2598
 * cdef char END = 'E'
 * 
 * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2,             # <<<<<<<<<<<<<<
 *                             bint end):
 *     """
 */

static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_asfreq(__pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __pyx_t_5numpy_int64_t __pyx_v_retval;
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_int64_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_asfreq", 0);

  /* "pandas/tslib.pyx":2607
 *         int64_t retval
 * 
 *     if end:             # <<<<<<<<<<<<<<
 *         retval = asfreq(period_ordinal, freq1, freq2, END)
 *     else:
 */
  if (__pyx_v_end) {

    /* "pandas/tslib.pyx":2608
 * 
 *     if end:
 *         retval = asfreq(period_ordinal, freq1, freq2, END)             # <<<<<<<<<<<<<<
 *     else:
 *         retval = asfreq(period_ordinal, freq1, freq2, START)
 */
    __pyx_t_1 = asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_6pandas_5tslib_END); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_retval = __pyx_t_1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2610
 *         retval = asfreq(period_ordinal, freq1, freq2, END)
 *     else:
 *         retval = asfreq(period_ordinal, freq1, freq2, START)             # <<<<<<<<<<<<<<
 * 
 *     if retval == INT32_MIN:
 */
    __pyx_t_1 = asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_6pandas_5tslib_START); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_retval = __pyx_t_1;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2612
 *         retval = asfreq(period_ordinal, freq1, freq2, START)
 * 
 *     if retval == INT32_MIN:             # <<<<<<<<<<<<<<
 *         raise ValueError('Frequency conversion failed')
 * 
 */
  __pyx_t_2 = (__pyx_v_retval == INT32_MIN);
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":2613
 * 
 *     if retval == INT32_MIN:
 *         raise ValueError('Frequency conversion failed')             # <<<<<<<<<<<<<<
 * 
 *     return retval
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":2615
 *         raise ValueError('Frequency conversion failed')
 * 
 *     return retval             # <<<<<<<<<<<<<<
 * 
 * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end):
 */
  __pyx_r = __pyx_v_retval;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("pandas.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_78period_asfreq[] = "\n    Convert period ordinal from one frequency to another, and if upsampling,\n    choose to use start ('S') or end ('E') of period.\n    ";
static PyObject *__pyx_pw_6pandas_5tslib_79period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_period_ordinal;
  int __pyx_v_freq1;
  int __pyx_v_freq2;
  int __pyx_v_end;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("period_asfreq (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__period_ordinal,&__pyx_n_s__freq1,&__pyx_n_s__freq2,&__pyx_n_s__end,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__period_ordinal)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_asfreq") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __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_period_ordinal = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_period_ordinal == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq1 = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq2 = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_end = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("period_asfreq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.period_asfreq", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_78period_asfreq(__pyx_self, __pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2598
 * cdef char END = 'E'
 * 
 * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2,             # <<<<<<<<<<<<<<
 *                             bint end):
 *     """
 */

static PyObject *__pyx_pf_6pandas_5tslib_78period_asfreq(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_period_ordinal, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_asfreq", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_81period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_80period_asfreq_arr[] = "\n    Convert int64-array of period ordinals from one frequency to another, and\n    if upsampling, choose to use start ('S') or end ('E') of period.\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_81period_asfreq_arr = {__Pyx_NAMESTR("period_asfreq_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_81period_asfreq_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_80period_asfreq_arr)};
static PyObject *__pyx_pw_6pandas_5tslib_81period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_freq1;
  int __pyx_v_freq2;
  int __pyx_v_end;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("period_asfreq_arr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__freq1,&__pyx_n_s__freq2,&__pyx_n_s__end,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_asfreq_arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __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_arr = ((PyArrayObject *)values[0]);
    __pyx_v_freq1 = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq2 = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_end = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("period_asfreq_arr", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.period_asfreq_arr", __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[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_80period_asfreq_arr(__pyx_self, __pyx_v_arr, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2617
 *     return retval
 * 
 * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end):             # <<<<<<<<<<<<<<
 *     """
 *     Convert int64-array of period ordinals from one frequency to another, and
 */

static PyObject *__pyx_pf_6pandas_5tslib_80period_asfreq_arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, int __pyx_v_freq1, int __pyx_v_freq2, int __pyx_v_end) {
  PyArrayObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  freq_conv_func __pyx_v_func;
  asfreq_info __pyx_v_finfo;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  char __pyx_v_relation;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_asfreq_arr", 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[0]; __pyx_lineno = 2617; __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/tslib.pyx":2630
 *         char relation
 * 
 *     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[0]; __pyx_lineno = 2630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2631
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     func = get_asfreq_func(freq1, freq2)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __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[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":2633
 *     result = np.empty(n, dtype=np.int64)
 * 
 *     func = get_asfreq_func(freq1, freq2)             # <<<<<<<<<<<<<<
 *     get_asfreq_info(freq1, freq2, &finfo)
 * 
 */
  __pyx_v_func = get_asfreq_func(__pyx_v_freq1, __pyx_v_freq2);

  /* "pandas/tslib.pyx":2634
 * 
 *     func = get_asfreq_func(freq1, freq2)
 *     get_asfreq_info(freq1, freq2, &finfo)             # <<<<<<<<<<<<<<
 * 
 *     if end:
 */
  get_asfreq_info(__pyx_v_freq1, __pyx_v_freq2, (&__pyx_v_finfo));

  /* "pandas/tslib.pyx":2636
 *     get_asfreq_info(freq1, freq2, &finfo)
 * 
 *     if end:             # <<<<<<<<<<<<<<
 *         relation = END
 *     else:
 */
  if (__pyx_v_end) {

    /* "pandas/tslib.pyx":2637
 * 
 *     if end:
 *         relation = END             # <<<<<<<<<<<<<<
 *     else:
 *         relation = START
 */
    __pyx_v_relation = __pyx_v_6pandas_5tslib_END;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2639
 *         relation = END
 *     else:
 *         relation = START             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
    __pyx_v_relation = __pyx_v_6pandas_5tslib_START;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2641
 *         relation = START
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = func(arr[i], relation, &finfo)
 *         if val == INT32_MIN:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/tslib.pyx":2642
 * 
 *     for i in range(n):
 *         val = func(arr[i], relation, &finfo)             # <<<<<<<<<<<<<<
 *         if val == INT32_MIN:
 *             raise ValueError("Unable to convert to desired frequency.")
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = __pyx_v_func((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arr.diminfo[0].strides)), __pyx_v_relation, (&__pyx_v_finfo));

    /* "pandas/tslib.pyx":2643
 *     for i in range(n):
 *         val = func(arr[i], relation, &finfo)
 *         if val == INT32_MIN:             # <<<<<<<<<<<<<<
 *             raise ValueError("Unable to convert to desired frequency.")
 *         result[i] = val
 */
    __pyx_t_14 = (__pyx_v_val == INT32_MIN);
    if (__pyx_t_14) {

      /* "pandas/tslib.pyx":2644
 *         val = func(arr[i], relation, &finfo)
 *         if val == INT32_MIN:
 *             raise ValueError("Unable to convert to desired frequency.")             # <<<<<<<<<<<<<<
 *         result[i] = val
 * 
 */
      __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/tslib.pyx":2645
 *         if val == INT32_MIN:
 *             raise ValueError("Unable to convert to desired frequency.")
 *         result[i] = val             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __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[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_val;
  }

  /* "pandas/tslib.pyx":2647
 *         result[i] = val
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_83period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_83period_ordinal = {__Pyx_NAMESTR("period_ordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_83period_ordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_83period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_y;
  int __pyx_v_m;
  int __pyx_v_d;
  int __pyx_v_h;
  int __pyx_v_min;
  int __pyx_v_s;
  int __pyx_v_us;
  int __pyx_v_ps;
  int __pyx_v_freq;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("period_ordinal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__y,&__pyx_n_s__m,&__pyx_n_s__d,&__pyx_n_s__h,&__pyx_n_s__min,&__pyx_n_s__s,&__pyx_n_s__us,&__pyx_n_s__ps,&__pyx_n_s__freq,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__h)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__min)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__s)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__us)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ps)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_ordinal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_y = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_y == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_m = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_m == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_d = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_d == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_h = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_min = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_min == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_s = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_s == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_us = __Pyx_PyInt_AsInt(values[6]); if (unlikely((__pyx_v_us == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ps = __Pyx_PyInt_AsInt(values[7]); if (unlikely((__pyx_v_ps == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[8]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("period_ordinal", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.period_ordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_82period_ordinal(__pyx_self, __pyx_v_y, __pyx_v_m, __pyx_v_d, __pyx_v_h, __pyx_v_min, __pyx_v_s, __pyx_v_us, __pyx_v_ps, __pyx_v_freq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2649
 *     return result
 * 
 * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t ordinal
 */

static PyObject *__pyx_pf_6pandas_5tslib_82period_ordinal(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_y, int __pyx_v_m, int __pyx_v_d, int __pyx_v_h, int __pyx_v_min, int __pyx_v_s, int __pyx_v_us, int __pyx_v_ps, int __pyx_v_freq) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_int64_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_ordinal", 0);

  /* "pandas/tslib.pyx":2653
 *         int64_t ordinal
 * 
 *     return get_period_ordinal(y, m, d, h, min, s, us, ps, freq)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = get_period_ordinal(__pyx_v_y, __pyx_v_m, __pyx_v_d, __pyx_v_h, __pyx_v_min, __pyx_v_s, __pyx_v_us, __pyx_v_ps, __pyx_v_freq); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2656
 * 
 * 
 * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         pandas_datetimestruct dts
 */

static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static __pyx_t_5numpy_int64_t __pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  pandas_datetimestruct __pyx_v_dts;
  date_info __pyx_v_dinfo;
  float __pyx_v_subsecond_fraction;
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_ordinal_to_dt64", 0);

  /* "pandas/tslib.pyx":2662
 *         float subsecond_fraction
 * 
 *     get_date_info(ordinal, freq, &dinfo)             # <<<<<<<<<<<<<<
 * 
 *     dts.year = dinfo.year
 */
  __pyx_t_1 = get_date_info(__pyx_v_ordinal, __pyx_v_freq, (&__pyx_v_dinfo)); if (unlikely(__pyx_t_1 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2664
 *     get_date_info(ordinal, freq, &dinfo)
 * 
 *     dts.year = dinfo.year             # <<<<<<<<<<<<<<
 *     dts.month = dinfo.month
 *     dts.day = dinfo.day
 */
  __pyx_t_1 = __pyx_v_dinfo.year;
  __pyx_v_dts.year = __pyx_t_1;

  /* "pandas/tslib.pyx":2665
 * 
 *     dts.year = dinfo.year
 *     dts.month = dinfo.month             # <<<<<<<<<<<<<<
 *     dts.day = dinfo.day
 *     dts.hour = dinfo.hour
 */
  __pyx_t_1 = __pyx_v_dinfo.month;
  __pyx_v_dts.month = __pyx_t_1;

  /* "pandas/tslib.pyx":2666
 *     dts.year = dinfo.year
 *     dts.month = dinfo.month
 *     dts.day = dinfo.day             # <<<<<<<<<<<<<<
 *     dts.hour = dinfo.hour
 *     dts.min = dinfo.minute
 */
  __pyx_t_1 = __pyx_v_dinfo.day;
  __pyx_v_dts.day = __pyx_t_1;

  /* "pandas/tslib.pyx":2667
 *     dts.month = dinfo.month
 *     dts.day = dinfo.day
 *     dts.hour = dinfo.hour             # <<<<<<<<<<<<<<
 *     dts.min = dinfo.minute
 *     dts.sec = int(dinfo.second)
 */
  __pyx_t_1 = __pyx_v_dinfo.hour;
  __pyx_v_dts.hour = __pyx_t_1;

  /* "pandas/tslib.pyx":2668
 *     dts.day = dinfo.day
 *     dts.hour = dinfo.hour
 *     dts.min = dinfo.minute             # <<<<<<<<<<<<<<
 *     dts.sec = int(dinfo.second)
 *     subsecond_fraction = dinfo.second - dts.sec
 */
  __pyx_t_1 = __pyx_v_dinfo.minute;
  __pyx_v_dts.min = __pyx_t_1;

  /* "pandas/tslib.pyx":2669
 *     dts.hour = dinfo.hour
 *     dts.min = dinfo.minute
 *     dts.sec = int(dinfo.second)             # <<<<<<<<<<<<<<
 *     subsecond_fraction = dinfo.second - dts.sec
 *     dts.us = int((subsecond_fraction) * 1e6)
 */
  __pyx_v_dts.sec = ((npy_int32)__pyx_v_dinfo.second);

  /* "pandas/tslib.pyx":2670
 *     dts.min = dinfo.minute
 *     dts.sec = int(dinfo.second)
 *     subsecond_fraction = dinfo.second - dts.sec             # <<<<<<<<<<<<<<
 *     dts.us = int((subsecond_fraction) * 1e6)
 *     dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6)
 */
  __pyx_v_subsecond_fraction = (__pyx_v_dinfo.second - __pyx_v_dts.sec);

  /* "pandas/tslib.pyx":2671
 *     dts.sec = int(dinfo.second)
 *     subsecond_fraction = dinfo.second - dts.sec
 *     dts.us = int((subsecond_fraction) * 1e6)             # <<<<<<<<<<<<<<
 *     dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6)
 * 
 */
  __pyx_v_dts.us = ((npy_int32)(__pyx_v_subsecond_fraction * 1e6));

  /* "pandas/tslib.pyx":2672
 *     subsecond_fraction = dinfo.second - dts.sec
 *     dts.us = int((subsecond_fraction) * 1e6)
 *     dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6)             # <<<<<<<<<<<<<<
 * 
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 */
  __pyx_v_dts.ps = ((npy_int32)(((__pyx_v_subsecond_fraction * 1e6) - __pyx_v_dts.us) * 1e6));

  /* "pandas/tslib.pyx":2674
 *     dts.ps = int(((subsecond_fraction) * 1e6 - dts.us) * 1e6)
 * 
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 * 
 * def period_format(int64_t value, int freq, object fmt=None):
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, (&__pyx_v_dts));
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_ordinal;
  int __pyx_v_freq;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("period_ordinal_to_dt64 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ordinal,&__pyx_n_s__freq,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__ordinal)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_ordinal_to_dt64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_ordinal_to_dt64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __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_ordinal = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_ordinal == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("period_ordinal_to_dt64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.period_ordinal_to_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(__pyx_self, __pyx_v_ordinal, __pyx_v_freq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2656
 * 
 * 
 * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         pandas_datetimestruct dts
 */

static PyObject *__pyx_pf_6pandas_5tslib_84period_ordinal_to_dt64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_ordinal, int __pyx_v_freq) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_ordinal_to_dt64", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_5tslib_period_ordinal_to_dt64(__pyx_v_ordinal, __pyx_v_freq, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_87period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_87period_format = {__Pyx_NAMESTR("period_format"), (PyCFunction)__pyx_pw_6pandas_5tslib_87period_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_87period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_value;
  int __pyx_v_freq;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("period_format (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__freq,&__pyx_n_s__fmt,0};
    PyObject* values[3] = {0,0,0};

    /* "pandas/tslib.pyx":2676
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 * 
 * def period_format(int64_t value, int freq, object fmt=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int freq_group
 */
    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__value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("period_format", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fmt);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "period_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __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_value = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_value == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fmt = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("period_format", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.period_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_86period_format(__pyx_self, __pyx_v_value, __pyx_v_freq, __pyx_v_fmt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_86period_format(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt) {
  int __pyx_v_freq_group;
  __pyx_t_5numpy_int64_t __pyx_v_left;
  __pyx_t_5numpy_int64_t __pyx_v_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("period_format", 0);
  __Pyx_INCREF(__pyx_v_fmt);

  /* "pandas/tslib.pyx":2680
 *         int freq_group
 * 
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         freq_group = (freq // 1000) * 1000
 *         if freq_group == 1000: # FR_ANN
 */
  __pyx_t_1 = (__pyx_v_fmt == Py_None);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2681
 * 
 *     if fmt is None:
 *         freq_group = (freq // 1000) * 1000             # <<<<<<<<<<<<<<
 *         if freq_group == 1000: # FR_ANN
 *             fmt = b'%Y'
 */
    __pyx_v_freq_group = (__Pyx_div_long(__pyx_v_freq, 1000) * 1000);

    /* "pandas/tslib.pyx":2706
 *         elif freq_group == 11000: # MICROSEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%u'
 *         elif freq_group == 12000: # NANOSEC             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:%M:%S.%n'
 *         else:
 */
    switch (__pyx_v_freq_group) {

      /* "pandas/tslib.pyx":2682
 *     if fmt is None:
 *         freq_group = (freq // 1000) * 1000
 *         if freq_group == 1000: # FR_ANN             # <<<<<<<<<<<<<<
 *             fmt = b'%Y'
 *         elif freq_group == 2000: # FR_QTR
 */
      case 1000:

      /* "pandas/tslib.pyx":2683
 *         freq_group = (freq // 1000) * 1000
 *         if freq_group == 1000: # FR_ANN
 *             fmt = b'%Y'             # <<<<<<<<<<<<<<
 *         elif freq_group == 2000: # FR_QTR
 *             fmt = b'%FQ%q'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_125));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_125);
      break;

      /* "pandas/tslib.pyx":2684
 *         if freq_group == 1000: # FR_ANN
 *             fmt = b'%Y'
 *         elif freq_group == 2000: # FR_QTR             # <<<<<<<<<<<<<<
 *             fmt = b'%FQ%q'
 *         elif freq_group == 3000: # FR_MTH
 */
      case 2000:

      /* "pandas/tslib.pyx":2685
 *             fmt = b'%Y'
 *         elif freq_group == 2000: # FR_QTR
 *             fmt = b'%FQ%q'             # <<<<<<<<<<<<<<
 *         elif freq_group == 3000: # FR_MTH
 *             fmt = b'%Y-%m'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_126));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_126);
      break;

      /* "pandas/tslib.pyx":2686
 *         elif freq_group == 2000: # FR_QTR
 *             fmt = b'%FQ%q'
 *         elif freq_group == 3000: # FR_MTH             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m'
 *         elif freq_group == 4000: # WK
 */
      case 3000:

      /* "pandas/tslib.pyx":2687
 *             fmt = b'%FQ%q'
 *         elif freq_group == 3000: # FR_MTH
 *             fmt = b'%Y-%m'             # <<<<<<<<<<<<<<
 *         elif freq_group == 4000: # WK
 *             left = period_asfreq(value, freq, 6000, 0)
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_127));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_127);
      break;

      /* "pandas/tslib.pyx":2688
 *         elif freq_group == 3000: # FR_MTH
 *             fmt = b'%Y-%m'
 *         elif freq_group == 4000: # WK             # <<<<<<<<<<<<<<
 *             left = period_asfreq(value, freq, 6000, 0)
 *             right = period_asfreq(value, freq, 6000, 1)
 */
      case 4000:

      /* "pandas/tslib.pyx":2689
 *             fmt = b'%Y-%m'
 *         elif freq_group == 4000: # WK
 *             left = period_asfreq(value, freq, 6000, 0)             # <<<<<<<<<<<<<<
 *             right = period_asfreq(value, freq, 6000, 1)
 *             return '%s/%s' % (period_format(left, 6000),
 */
      __pyx_v_left = __pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_value, __pyx_v_freq, 6000, 0, 0);

      /* "pandas/tslib.pyx":2690
 *         elif freq_group == 4000: # WK
 *             left = period_asfreq(value, freq, 6000, 0)
 *             right = period_asfreq(value, freq, 6000, 1)             # <<<<<<<<<<<<<<
 *             return '%s/%s' % (period_format(left, 6000),
 *                               period_format(right, 6000))
 */
      __pyx_v_right = __pyx_f_6pandas_5tslib_period_asfreq(__pyx_v_value, __pyx_v_freq, 6000, 1, 0);

      /* "pandas/tslib.pyx":2691
 *             left = period_asfreq(value, freq, 6000, 0)
 *             right = period_asfreq(value, freq, 6000, 1)
 *             return '%s/%s' % (period_format(left, 6000),             # <<<<<<<<<<<<<<
 *                               period_format(right, 6000))
 *         elif (freq_group == 5000 # BUS
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__period_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_left); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __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_INCREF(__pyx_int_6000);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_6000);
      __Pyx_GIVEREF(__pyx_int_6000);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":2692
 *             right = period_asfreq(value, freq, 6000, 1)
 *             return '%s/%s' % (period_format(left, 6000),
 *                               period_format(right, 6000))             # <<<<<<<<<<<<<<
 *         elif (freq_group == 5000 # BUS
 *               or freq_group == 6000): # DAY
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__period_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_right); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_int_6000);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_6000);
      __Pyx_GIVEREF(__pyx_int_6000);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __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_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_128), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_r = ((PyObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
      break;

      /* "pandas/tslib.pyx":2693
 *             return '%s/%s' % (period_format(left, 6000),
 *                               period_format(right, 6000))
 *         elif (freq_group == 5000 # BUS             # <<<<<<<<<<<<<<
 *               or freq_group == 6000): # DAY
 *             fmt = b'%Y-%m-%d'
 */
      case 5000:

      /* "pandas/tslib.pyx":2694
 *                               period_format(right, 6000))
 *         elif (freq_group == 5000 # BUS
 *               or freq_group == 6000): # DAY             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d'
 *         elif freq_group == 7000: # HR
 */
      case 6000:

      /* "pandas/tslib.pyx":2695
 *         elif (freq_group == 5000 # BUS
 *               or freq_group == 6000): # DAY
 *             fmt = b'%Y-%m-%d'             # <<<<<<<<<<<<<<
 *         elif freq_group == 7000: # HR
 *             fmt = b'%Y-%m-%d %H:00'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_129));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_129);
      break;

      /* "pandas/tslib.pyx":2696
 *               or freq_group == 6000): # DAY
 *             fmt = b'%Y-%m-%d'
 *         elif freq_group == 7000: # HR             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:00'
 *         elif freq_group == 8000: # MIN
 */
      case 7000:

      /* "pandas/tslib.pyx":2697
 *             fmt = b'%Y-%m-%d'
 *         elif freq_group == 7000: # HR
 *             fmt = b'%Y-%m-%d %H:00'             # <<<<<<<<<<<<<<
 *         elif freq_group == 8000: # MIN
 *             fmt = b'%Y-%m-%d %H:%M'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_130));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_130);
      break;

      /* "pandas/tslib.pyx":2698
 *         elif freq_group == 7000: # HR
 *             fmt = b'%Y-%m-%d %H:00'
 *         elif freq_group == 8000: # MIN             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:%M'
 *         elif freq_group == 9000: # SEC
 */
      case 8000:

      /* "pandas/tslib.pyx":2699
 *             fmt = b'%Y-%m-%d %H:00'
 *         elif freq_group == 8000: # MIN
 *             fmt = b'%Y-%m-%d %H:%M'             # <<<<<<<<<<<<<<
 *         elif freq_group == 9000: # SEC
 *             fmt = b'%Y-%m-%d %H:%M:%S'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_131));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_131);
      break;

      /* "pandas/tslib.pyx":2700
 *         elif freq_group == 8000: # MIN
 *             fmt = b'%Y-%m-%d %H:%M'
 *         elif freq_group == 9000: # SEC             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:%M:%S'
 *         elif freq_group == 10000: # MILLISEC
 */
      case 9000:

      /* "pandas/tslib.pyx":2701
 *             fmt = b'%Y-%m-%d %H:%M'
 *         elif freq_group == 9000: # SEC
 *             fmt = b'%Y-%m-%d %H:%M:%S'             # <<<<<<<<<<<<<<
 *         elif freq_group == 10000: # MILLISEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%l'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_132));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_132);
      break;

      /* "pandas/tslib.pyx":2702
 *         elif freq_group == 9000: # SEC
 *             fmt = b'%Y-%m-%d %H:%M:%S'
 *         elif freq_group == 10000: # MILLISEC             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:%M:%S.%l'
 *         elif freq_group == 11000: # MICROSEC
 */
      case 10000:

      /* "pandas/tslib.pyx":2703
 *             fmt = b'%Y-%m-%d %H:%M:%S'
 *         elif freq_group == 10000: # MILLISEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%l'             # <<<<<<<<<<<<<<
 *         elif freq_group == 11000: # MICROSEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%u'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_133));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_133);
      break;

      /* "pandas/tslib.pyx":2704
 *         elif freq_group == 10000: # MILLISEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%l'
 *         elif freq_group == 11000: # MICROSEC             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:%M:%S.%u'
 *         elif freq_group == 12000: # NANOSEC
 */
      case 11000:

      /* "pandas/tslib.pyx":2705
 *             fmt = b'%Y-%m-%d %H:%M:%S.%l'
 *         elif freq_group == 11000: # MICROSEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%u'             # <<<<<<<<<<<<<<
 *         elif freq_group == 12000: # NANOSEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%n'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_134));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_134);
      break;

      /* "pandas/tslib.pyx":2706
 *         elif freq_group == 11000: # MICROSEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%u'
 *         elif freq_group == 12000: # NANOSEC             # <<<<<<<<<<<<<<
 *             fmt = b'%Y-%m-%d %H:%M:%S.%n'
 *         else:
 */
      case 12000:

      /* "pandas/tslib.pyx":2707
 *             fmt = b'%Y-%m-%d %H:%M:%S.%u'
 *         elif freq_group == 12000: # NANOSEC
 *             fmt = b'%Y-%m-%d %H:%M:%S.%n'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('Unknown freq: %d' % freq)
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_b_135));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_135);
      break;
      default:

      /* "pandas/tslib.pyx":2709
 *             fmt = b'%Y-%m-%d %H:%M:%S.%n'
 *         else:
 *             raise ValueError('Unknown freq: %d' % freq)             # <<<<<<<<<<<<<<
 * 
 *     return _period_strftime(value, freq, fmt)
 */
      __pyx_t_2 = PyInt_FromLong(__pyx_v_freq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_136), __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      break;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2711
 *             raise ValueError('Unknown freq: %d' % freq)
 * 
 *     return _period_strftime(value, freq, fmt)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_6pandas_5tslib__period_strftime(__pyx_v_value, __pyx_v_freq, __pyx_v_fmt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2723
 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"]
 * 
 * cdef object _period_strftime(int64_t value, int freq, object fmt):             # <<<<<<<<<<<<<<
 *     import sys
 * 
 */

static PyObject *__pyx_f_6pandas_5tslib__period_strftime(__pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq, PyObject *__pyx_v_fmt) {
  CYTHON_UNUSED PyObject *__pyx_v_sys = NULL;
  Py_ssize_t __pyx_v_i;
  date_info __pyx_v_dinfo;
  char *__pyx_v_formatted;
  PyObject *__pyx_v_pat = 0;
  PyObject *__pyx_v_repl = 0;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_found_pat = 0;
  int __pyx_v_year;
  int __pyx_v_quarter;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  char *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_period_strftime", 0);
  __Pyx_INCREF(__pyx_v_fmt);

  /* "pandas/tslib.pyx":2724
 * 
 * cdef object _period_strftime(int64_t value, int freq, object fmt):
 *     import sys             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sys = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":2731
 *         char *formatted
 *         object pat, repl, result
 *         list found_pat = [False] * len(extra_fmts)             # <<<<<<<<<<<<<<
 *         int year, quarter
 * 
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts);
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1 * ((__pyx_t_3<0) ? 0:__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_t_3; __pyx_temp++) {
      __Pyx_INCREF(__pyx_t_1);
      PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_found_pat = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":2734
 *         int year, quarter
 * 
 *     if PyUnicode_Check(fmt):             # <<<<<<<<<<<<<<
 *         fmt = fmt.encode('utf-8')
 * 
 */
  __pyx_t_4 = PyUnicode_Check(__pyx_v_fmt);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2735
 * 
 *     if PyUnicode_Check(fmt):
 *         fmt = fmt.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     get_date_info(value, freq, &dinfo)
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_138), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_fmt);
    __pyx_v_fmt = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2737
 *         fmt = fmt.encode('utf-8')
 * 
 *     get_date_info(value, freq, &dinfo)             # <<<<<<<<<<<<<<
 *     for i in range(len(extra_fmts)):
 *         pat = extra_fmts[i][0]
 */
  __pyx_t_5 = get_date_info(__pyx_v_value, __pyx_v_freq, (&__pyx_v_dinfo)); if (unlikely(__pyx_t_5 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2738
 * 
 *     get_date_info(value, freq, &dinfo)
 *     for i in range(len(extra_fmts)):             # <<<<<<<<<<<<<<
 *         pat = extra_fmts[i][0]
 *         repl = extra_fmts[i][1]
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts);
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_3; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/tslib.pyx":2739
 *     get_date_info(value, freq, &dinfo)
 *     for i in range(len(extra_fmts)):
 *         pat = extra_fmts[i][0]             # <<<<<<<<<<<<<<
 *         repl = extra_fmts[i][1]
 *         if pat in fmt:
 */
    if (unlikely(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_v_pat);
    __pyx_v_pat = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":2740
 *     for i in range(len(extra_fmts)):
 *         pat = extra_fmts[i][0]
 *         repl = extra_fmts[i][1]             # <<<<<<<<<<<<<<
 *         if pat in fmt:
 *             fmt = fmt.replace(pat, repl)
 */
    if (unlikely(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_v_repl);
    __pyx_v_repl = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":2741
 *         pat = extra_fmts[i][0]
 *         repl = extra_fmts[i][1]
 *         if pat in fmt:             # <<<<<<<<<<<<<<
 *             fmt = fmt.replace(pat, repl)
 *             found_pat[i] = True
 */
    __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_pat, __pyx_v_fmt, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":2742
 *         repl = extra_fmts[i][1]
 *         if pat in fmt:
 *             fmt = fmt.replace(pat, repl)             # <<<<<<<<<<<<<<
 *             found_pat[i] = True
 * 
 */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_pat);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pat);
      __Pyx_GIVEREF(__pyx_v_pat);
      __Pyx_INCREF(__pyx_v_repl);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_repl);
      __Pyx_GIVEREF(__pyx_v_repl);
      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":2743
 *         if pat in fmt:
 *             fmt = fmt.replace(pat, repl)
 *             found_pat[i] = True             # <<<<<<<<<<<<<<
 * 
 *     formatted = c_strftime(&dinfo, <char*> fmt)
 */
      __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_found_pat), __pyx_v_i, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/tslib.pyx":2745
 *             found_pat[i] = True
 * 
 *     formatted = c_strftime(&dinfo, <char*> fmt)             # <<<<<<<<<<<<<<
 * 
 *     result = util.char_to_string(formatted)
 */
  __pyx_t_8 = PyBytes_AsString(__pyx_v_fmt); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_formatted = c_strftime((&__pyx_v_dinfo), ((char *)__pyx_t_8));

  /* "pandas/tslib.pyx":2747
 *     formatted = c_strftime(&dinfo, <char*> fmt)
 * 
 *     result = util.char_to_string(formatted)             # <<<<<<<<<<<<<<
 *     free(formatted)
 * 
 */
  __pyx_t_7 = char_to_string(__pyx_v_formatted); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_result = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pandas/tslib.pyx":2748
 * 
 *     result = util.char_to_string(formatted)
 *     free(formatted)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(len(extra_fmts)):
 */
  free(__pyx_v_formatted);

  /* "pandas/tslib.pyx":2750
 *     free(formatted)
 * 
 *     for i in range(len(extra_fmts)):             # <<<<<<<<<<<<<<
 *         if found_pat[i]:
 *             if get_yq(value, freq, &quarter, &year) < 0:
 */
  __pyx_t_7 = ((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts);
  __Pyx_INCREF(__pyx_t_7);
  if (unlikely(__pyx_t_7 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_3 = PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_3; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/tslib.pyx":2751
 * 
 *     for i in range(len(extra_fmts)):
 *         if found_pat[i]:             # <<<<<<<<<<<<<<
 *             if get_yq(value, freq, &quarter, &year) < 0:
 *                 raise ValueError('Unable to get quarter and year')
 */
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_found_pat), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":2752
 *     for i in range(len(extra_fmts)):
 *         if found_pat[i]:
 *             if get_yq(value, freq, &quarter, &year) < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Unable to get quarter and year')
 * 
 */
      __pyx_t_4 = (get_yq(__pyx_v_value, __pyx_v_freq, (&__pyx_v_quarter), (&__pyx_v_year)) < 0);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2753
 *         if found_pat[i]:
 *             if get_yq(value, freq, &quarter, &year) < 0:
 *                 raise ValueError('Unable to get quarter and year')             # <<<<<<<<<<<<<<
 * 
 *             if i == 0:
 */
        __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_140), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "pandas/tslib.pyx":2765
 *             elif i == 4:
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:             # <<<<<<<<<<<<<<
 *                 repl = '%09d' % (value % 1000000000)
 * 
 */
      switch (__pyx_v_i) {

        /* "pandas/tslib.pyx":2755
 *                 raise ValueError('Unable to get quarter and year')
 * 
 *             if i == 0:             # <<<<<<<<<<<<<<
 *                 repl = '%d' % quarter
 *             elif i == 1:  # %f, 2-digit year
 */
        case 0:

        /* "pandas/tslib.pyx":2756
 * 
 *             if i == 0:
 *                 repl = '%d' % quarter             # <<<<<<<<<<<<<<
 *             elif i == 1:  # %f, 2-digit year
 *                 repl = '%.2d' % (year % 100)
 */
        __pyx_t_7 = PyInt_FromLong(__pyx_v_quarter); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_141), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_v_repl);
        __pyx_v_repl = ((PyObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        break;

        /* "pandas/tslib.pyx":2757
 *             if i == 0:
 *                 repl = '%d' % quarter
 *             elif i == 1:  # %f, 2-digit year             # <<<<<<<<<<<<<<
 *                 repl = '%.2d' % (year % 100)
 *             elif i == 2:
 */
        case 1:

        /* "pandas/tslib.pyx":2758
 *                 repl = '%d' % quarter
 *             elif i == 1:  # %f, 2-digit year
 *                 repl = '%.2d' % (year % 100)             # <<<<<<<<<<<<<<
 *             elif i == 2:
 *                 repl = '%d' % year
 */
        __pyx_t_2 = PyInt_FromLong(__Pyx_mod_long(__pyx_v_year, 100)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_142), __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_repl);
        __pyx_v_repl = ((PyObject *)__pyx_t_7);
        __pyx_t_7 = 0;
        break;

        /* "pandas/tslib.pyx":2759
 *             elif i == 1:  # %f, 2-digit year
 *                 repl = '%.2d' % (year % 100)
 *             elif i == 2:             # <<<<<<<<<<<<<<
 *                 repl = '%d' % year
 *             elif i == 3:
 */
        case 2:

        /* "pandas/tslib.pyx":2760
 *                 repl = '%.2d' % (year % 100)
 *             elif i == 2:
 *                 repl = '%d' % year             # <<<<<<<<<<<<<<
 *             elif i == 3:
 *                 repl = '%03d' % (value % 1000)
 */
        __pyx_t_7 = PyInt_FromLong(__pyx_v_year); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_141), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_v_repl);
        __pyx_v_repl = ((PyObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        break;

        /* "pandas/tslib.pyx":2761
 *             elif i == 2:
 *                 repl = '%d' % year
 *             elif i == 3:             # <<<<<<<<<<<<<<
 *                 repl = '%03d' % (value % 1000)
 *             elif i == 4:
 */
        case 3:

        /* "pandas/tslib.pyx":2762
 *                 repl = '%d' % year
 *             elif i == 3:
 *                 repl = '%03d' % (value % 1000)             # <<<<<<<<<<<<<<
 *             elif i == 4:
 *                 repl = '%06d' % (value % 1000000)
 */
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_143), __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_repl);
        __pyx_v_repl = ((PyObject *)__pyx_t_7);
        __pyx_t_7 = 0;
        break;

        /* "pandas/tslib.pyx":2763
 *             elif i == 3:
 *                 repl = '%03d' % (value % 1000)
 *             elif i == 4:             # <<<<<<<<<<<<<<
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:
 */
        case 4:

        /* "pandas/tslib.pyx":2764
 *                 repl = '%03d' % (value % 1000)
 *             elif i == 4:
 *                 repl = '%06d' % (value % 1000000)             # <<<<<<<<<<<<<<
 *             elif i == 5:
 *                 repl = '%09d' % (value % 1000000000)
 */
        __pyx_t_7 = __Pyx_PyInt_to_py_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000000)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_144), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_v_repl);
        __pyx_v_repl = ((PyObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        break;

        /* "pandas/tslib.pyx":2765
 *             elif i == 4:
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:             # <<<<<<<<<<<<<<
 *                 repl = '%09d' % (value % 1000000000)
 * 
 */
        case 5:

        /* "pandas/tslib.pyx":2766
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:
 *                 repl = '%09d' % (value % 1000000000)             # <<<<<<<<<<<<<<
 * 
 *             result = result.replace(str_extra_fmts[i], repl)
 */
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_value, 1000000000)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_145), __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_v_repl);
        __pyx_v_repl = ((PyObject *)__pyx_t_7);
        __pyx_t_7 = 0;
        break;
      }

      /* "pandas/tslib.pyx":2768
 *                 repl = '%09d' % (value % 1000000000)
 * 
 *             result = result.replace(str_extra_fmts[i], repl)             # <<<<<<<<<<<<<<
 * 
 *     if PY2:
 */
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(!__pyx_v_repl)) { __Pyx_RaiseUnboundLocalError("repl"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_repl);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_repl);
      __Pyx_GIVEREF(__pyx_v_repl);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L9;
    }
    __pyx_L9:;
  }

  /* "pandas/tslib.pyx":2770
 *             result = result.replace(str_extra_fmts[i], repl)
 * 
 *     if PY2:             # <<<<<<<<<<<<<<
 *        result = result.decode('utf-8', 'ignore')
 * 
 */
  if (__pyx_v_6pandas_5tslib_PY2) {

    /* "pandas/tslib.pyx":2771
 * 
 *     if PY2:
 *        result = result.decode('utf-8', 'ignore')             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_146), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "pandas/tslib.pyx":2773
 *        result = result.decode('utf-8', 'ignore')
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * # period accessors
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.tslib._period_strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sys);
  __Pyx_XDECREF(__pyx_v_pat);
  __Pyx_XDECREF(__pyx_v_repl);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_found_pat);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_89get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_89get_period_field = {__Pyx_NAMESTR("get_period_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_89get_period_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_89get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_code;
  __pyx_t_5numpy_int64_t __pyx_v_value;
  int __pyx_v_freq;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_period_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__code,&__pyx_n_s__value,&__pyx_n_s__freq,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__code)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __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_period_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __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_code = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_value = __Pyx_PyInt_from_py_npy_int64(values[1]); if (unlikely((__pyx_v_value == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_period_field", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.get_period_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_88get_period_field(__pyx_self, __pyx_v_code, __pyx_v_value, __pyx_v_freq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2779
 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN
 * 
 * def get_period_field(int code, int64_t value, int freq):             # <<<<<<<<<<<<<<
 *     cdef accessor f = _get_accessor_func(code)
 *     if f is NULL:
 */

static PyObject *__pyx_pf_6pandas_5tslib_88get_period_field(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, __pyx_t_5numpy_int64_t __pyx_v_value, int __pyx_v_freq) {
  __pyx_t_6pandas_5tslib_accessor __pyx_v_f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_period_field", 0);

  /* "pandas/tslib.pyx":2780
 * 
 * def get_period_field(int code, int64_t value, int freq):
 *     cdef accessor f = _get_accessor_func(code)             # <<<<<<<<<<<<<<
 *     if f is NULL:
 *         raise ValueError('Unrecognized period code: %d' % code)
 */
  __pyx_v_f = __pyx_f_6pandas_5tslib__get_accessor_func(__pyx_v_code);

  /* "pandas/tslib.pyx":2781
 * def get_period_field(int code, int64_t value, int freq):
 *     cdef accessor f = _get_accessor_func(code)
 *     if f is NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Unrecognized period code: %d' % code)
 *     return f(value, freq)
 */
  __pyx_t_1 = (__pyx_v_f == NULL);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2782
 *     cdef accessor f = _get_accessor_func(code)
 *     if f is NULL:
 *         raise ValueError('Unrecognized period code: %d' % code)             # <<<<<<<<<<<<<<
 *     return f(value, freq)
 * 
 */
    __pyx_t_2 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_147), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2783
 *     if f is NULL:
 *         raise ValueError('Unrecognized period code: %d' % code)
 *     return f(value, freq)             # <<<<<<<<<<<<<<
 * 
 * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_f(__pyx_v_value, __pyx_v_freq); if (unlikely(__pyx_t_4 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyInt_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_91get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_91get_period_field_arr = {__Pyx_NAMESTR("get_period_field_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_91get_period_field_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_91get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_code;
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_freq;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_period_field_arr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__code,&__pyx_n_s__arr,&__pyx_n_s__freq,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__code)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __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_period_field_arr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __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_code = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_arr = ((PyArrayObject *)values[1]);
    __pyx_v_freq = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_freq == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_period_field_arr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.get_period_field_arr", __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[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_90get_period_field_arr(__pyx_self, __pyx_v_code, __pyx_v_arr, __pyx_v_freq);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2785
 *     return f(value, freq)
 * 
 * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pf_6pandas_5tslib_90get_period_field_arr(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code, PyArrayObject *__pyx_v_arr, int __pyx_v_freq) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyArrayObject *__pyx_v_out = 0;
  __pyx_t_6pandas_5tslib_accessor __pyx_v_f;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_period_field_arr", 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_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[0]; __pyx_lineno = 2785; __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/tslib.pyx":2791
 *         accessor f
 * 
 *     f = _get_accessor_func(code)             # <<<<<<<<<<<<<<
 *     if f is NULL:
 *         raise ValueError('Unrecognized period code: %d' % code)
 */
  __pyx_v_f = __pyx_f_6pandas_5tslib__get_accessor_func(__pyx_v_code);

  /* "pandas/tslib.pyx":2792
 * 
 *     f = _get_accessor_func(code)
 *     if f is NULL:             # <<<<<<<<<<<<<<
 *         raise ValueError('Unrecognized period code: %d' % code)
 * 
 */
  __pyx_t_1 = (__pyx_v_f == NULL);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2793
 *     f = _get_accessor_func(code)
 *     if f is NULL:
 *         raise ValueError('Unrecognized period code: %d' % code)             # <<<<<<<<<<<<<<
 * 
 *     sz = len(arr)
 */
    __pyx_t_2 = PyInt_FromLong(__pyx_v_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_147), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2795
 *         raise ValueError('Unrecognized period code: %d' % code)
 * 
 *     sz = len(arr)             # <<<<<<<<<<<<<<
 *     out = np.empty(sz, dtype=np.int64)
 * 
 */
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_sz = __pyx_t_4;

  /* "pandas/tslib.pyx":2796
 * 
 *     sz = len(arr)
 *     out = np.empty(sz, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(sz):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_sz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_7);
  {
    __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_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_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];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pandas/tslib.pyx":2798
 *     out = np.empty(sz, dtype=np.int64)
 * 
 *     for i in range(sz):             # <<<<<<<<<<<<<<
 *         out[i] = f(arr[i], freq)
 * 
 */
  __pyx_t_4 = __pyx_v_sz;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_4; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "pandas/tslib.pyx":2799
 * 
 *     for i in range(sz):
 *         out[i] = f(arr[i], freq)             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_9 = __pyx_v_f((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides)), __pyx_v_freq); if (unlikely(__pyx_t_9 == INT32_MIN)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_15 = __pyx_v_i;
    __pyx_t_16 = -1;
    if (__pyx_t_15 < 0) {
      __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_16 = 0;
    if (unlikely(__pyx_t_16 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_16);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_t_9;
  }

  /* "pandas/tslib.pyx":2801
 *         out[i] = f(arr[i], freq)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __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_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.get_period_field_arr", __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_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2805
 * 
 * 
 * cdef accessor _get_accessor_func(int code):             # <<<<<<<<<<<<<<
 *     if code == 0:
 *         return &pyear
 */

static __pyx_t_6pandas_5tslib_accessor __pyx_f_6pandas_5tslib__get_accessor_func(int __pyx_v_code) {
  __pyx_t_6pandas_5tslib_accessor __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_accessor_func", 0);

  /* "pandas/tslib.pyx":2826
 *     elif code == 9:
 *         return &pday_of_year
 *     elif code == 10:             # <<<<<<<<<<<<<<
 *         return &pweekday
 *     return NULL
 */
  switch (__pyx_v_code) {

    /* "pandas/tslib.pyx":2806
 * 
 * cdef accessor _get_accessor_func(int code):
 *     if code == 0:             # <<<<<<<<<<<<<<
 *         return &pyear
 *     elif code == 1:
 */
    case 0:

    /* "pandas/tslib.pyx":2807
 * cdef accessor _get_accessor_func(int code):
 *     if code == 0:
 *         return &pyear             # <<<<<<<<<<<<<<
 *     elif code == 1:
 *         return &pqyear
 */
    __pyx_r = (&pyear);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2808
 *     if code == 0:
 *         return &pyear
 *     elif code == 1:             # <<<<<<<<<<<<<<
 *         return &pqyear
 *     elif code == 2:
 */
    case 1:

    /* "pandas/tslib.pyx":2809
 *         return &pyear
 *     elif code == 1:
 *         return &pqyear             # <<<<<<<<<<<<<<
 *     elif code == 2:
 *         return &pquarter
 */
    __pyx_r = (&pqyear);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2810
 *     elif code == 1:
 *         return &pqyear
 *     elif code == 2:             # <<<<<<<<<<<<<<
 *         return &pquarter
 *     elif code == 3:
 */
    case 2:

    /* "pandas/tslib.pyx":2811
 *         return &pqyear
 *     elif code == 2:
 *         return &pquarter             # <<<<<<<<<<<<<<
 *     elif code == 3:
 *         return &pmonth
 */
    __pyx_r = (&pquarter);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2812
 *     elif code == 2:
 *         return &pquarter
 *     elif code == 3:             # <<<<<<<<<<<<<<
 *         return &pmonth
 *     elif code == 4:
 */
    case 3:

    /* "pandas/tslib.pyx":2813
 *         return &pquarter
 *     elif code == 3:
 *         return &pmonth             # <<<<<<<<<<<<<<
 *     elif code == 4:
 *         return &pday
 */
    __pyx_r = (&pmonth);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2814
 *     elif code == 3:
 *         return &pmonth
 *     elif code == 4:             # <<<<<<<<<<<<<<
 *         return &pday
 *     elif code == 5:
 */
    case 4:

    /* "pandas/tslib.pyx":2815
 *         return &pmonth
 *     elif code == 4:
 *         return &pday             # <<<<<<<<<<<<<<
 *     elif code == 5:
 *         return &phour
 */
    __pyx_r = (&pday);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2816
 *     elif code == 4:
 *         return &pday
 *     elif code == 5:             # <<<<<<<<<<<<<<
 *         return &phour
 *     elif code == 6:
 */
    case 5:

    /* "pandas/tslib.pyx":2817
 *         return &pday
 *     elif code == 5:
 *         return &phour             # <<<<<<<<<<<<<<
 *     elif code == 6:
 *         return &pminute
 */
    __pyx_r = (&phour);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2818
 *     elif code == 5:
 *         return &phour
 *     elif code == 6:             # <<<<<<<<<<<<<<
 *         return &pminute
 *     elif code == 7:
 */
    case 6:

    /* "pandas/tslib.pyx":2819
 *         return &phour
 *     elif code == 6:
 *         return &pminute             # <<<<<<<<<<<<<<
 *     elif code == 7:
 *         return &psecond
 */
    __pyx_r = (&pminute);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2820
 *     elif code == 6:
 *         return &pminute
 *     elif code == 7:             # <<<<<<<<<<<<<<
 *         return &psecond
 *     elif code == 8:
 */
    case 7:

    /* "pandas/tslib.pyx":2821
 *         return &pminute
 *     elif code == 7:
 *         return &psecond             # <<<<<<<<<<<<<<
 *     elif code == 8:
 *         return &pweek
 */
    __pyx_r = (&psecond);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2822
 *     elif code == 7:
 *         return &psecond
 *     elif code == 8:             # <<<<<<<<<<<<<<
 *         return &pweek
 *     elif code == 9:
 */
    case 8:

    /* "pandas/tslib.pyx":2823
 *         return &psecond
 *     elif code == 8:
 *         return &pweek             # <<<<<<<<<<<<<<
 *     elif code == 9:
 *         return &pday_of_year
 */
    __pyx_r = (&pweek);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2824
 *     elif code == 8:
 *         return &pweek
 *     elif code == 9:             # <<<<<<<<<<<<<<
 *         return &pday_of_year
 *     elif code == 10:
 */
    case 9:

    /* "pandas/tslib.pyx":2825
 *         return &pweek
 *     elif code == 9:
 *         return &pday_of_year             # <<<<<<<<<<<<<<
 *     elif code == 10:
 *         return &pweekday
 */
    __pyx_r = (&pday_of_year);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":2826
 *     elif code == 9:
 *         return &pday_of_year
 *     elif code == 10:             # <<<<<<<<<<<<<<
 *         return &pweekday
 *     return NULL
 */
    case 10:

    /* "pandas/tslib.pyx":2827
 *         return &pday_of_year
 *     elif code == 10:
 *         return &pweekday             # <<<<<<<<<<<<<<
 *     return NULL
 * 
 */
    __pyx_r = (&pweekday);
    goto __pyx_L0;
    break;
  }

  /* "pandas/tslib.pyx":2828
 *     elif code == 10:
 *         return &pweekday
 *     return NULL             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = NULL;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_93extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_93extract_ordinals = {__Pyx_NAMESTR("extract_ordinals"), (PyCFunction)__pyx_pw_6pandas_5tslib_93extract_ordinals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_93extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_freq = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extract_ordinals (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__freq,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__freq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("extract_ordinals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract_ordinals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __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_freq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extract_ordinals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.extract_ordinals", __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[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_92extract_ordinals(__pyx_self, __pyx_v_values, __pyx_v_freq);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2831
 * 
 * 
 * def extract_ordinals(ndarray[object] values, freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_5tslib_92extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_ordinals = 0;
  PyObject *__pyx_v_p = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ordinals;
  __Pyx_Buffer __pyx_pybuffer_ordinals;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  __pyx_t_5numpy_int64_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extract_ordinals", 0);
  __pyx_pybuffer_ordinals.pybuffer.buf = NULL;
  __pyx_pybuffer_ordinals.refcount = 0;
  __pyx_pybuffernd_ordinals.data = NULL;
  __pyx_pybuffernd_ordinals.rcbuffer = &__pyx_pybuffer_ordinals;
  __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[0]; __pyx_lineno = 2831; __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/tslib.pyx":2833
 * def extract_ordinals(ndarray[object] values, freq):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] ordinals = np.empty(n, dtype=np.int64)
 *         object p
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2834
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         ndarray[int64_t] ordinals = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 *         object p
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __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_ordinals.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_ordinals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_ordinals.diminfo[0].strides = __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ordinals.diminfo[0].shape = __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_ordinals = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":2837
 *         object p
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         p = values[i]
 *         ordinals[i] = p.ordinal
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pandas/tslib.pyx":2838
 * 
 *     for i in range(n):
 *         p = values[i]             # <<<<<<<<<<<<<<
 *         ordinals[i] = p.ordinal
 *         if p.freq != freq:
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_p);
    __pyx_v_p = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/tslib.pyx":2839
 *     for i in range(n):
 *         p = values[i]
 *         ordinals[i] = p.ordinal             # <<<<<<<<<<<<<<
 *         if p.freq != freq:
 *             raise ValueError("%s is wrong freq" % p)
 */
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_p, __pyx_n_s__ordinal); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_6); if (unlikely((__pyx_t_11 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_ordinals.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_ordinals.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ordinals.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_ordinals.diminfo[0].strides) = __pyx_t_11;

    /* "pandas/tslib.pyx":2840
 *         p = values[i]
 *         ordinals[i] = p.ordinal
 *         if p.freq != freq:             # <<<<<<<<<<<<<<
 *             raise ValueError("%s is wrong freq" % p)
 * 
 */
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_p, __pyx_n_s__freq); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_freq, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_13) {

      /* "pandas/tslib.pyx":2841
 *         ordinals[i] = p.ordinal
 *         if p.freq != freq:
 *             raise ValueError("%s is wrong freq" % p)             # <<<<<<<<<<<<<<
 * 
 *     return ordinals
 */
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_148), __pyx_v_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/tslib.pyx":2843
 *             raise ValueError("%s is wrong freq" % p)
 * 
 *     return ordinals             # <<<<<<<<<<<<<<
 * 
 * cpdef resolution(ndarray[int64_t] stamps, tz=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ordinals));
  __pyx_r = ((PyObject *)__pyx_v_ordinals);
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2845
 *     return ordinals
 * 
 * cpdef resolution(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */

static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_resolution(PyArrayObject *__pyx_v_stamps, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pandas_5tslib_resolution *__pyx_optional_args) {
  PyObject *__pyx_v_tz = ((PyObject *)Py_None);
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  pandas_datetimestruct __pyx_v_dts;
  int __pyx_v_reso;
  int __pyx_v_curr_reso;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("resolution", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tz = __pyx_optional_args->tz;
    }
  }
  __Pyx_INCREF(__pyx_v_tz);
  __pyx_pybuffer_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2847
 * cpdef resolution(ndarray[int64_t] stamps, tz=None):
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)             # <<<<<<<<<<<<<<
 *         pandas_datetimestruct dts
 *         int reso = D_RESO, curr_reso
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2849
 *         Py_ssize_t i, n = len(stamps)
 *         pandas_datetimestruct dts
 *         int reso = D_RESO, curr_reso             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reso = __pyx_t_3;

  /* "pandas/tslib.pyx":2851
 *         int reso = D_RESO, curr_reso
 * 
 *     if tz is not None:             # <<<<<<<<<<<<<<
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)
 */
  __pyx_t_4 = (__pyx_v_tz != Py_None);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2852
 * 
 *     if tz is not None:
 *         if isinstance(tz, basestring):             # <<<<<<<<<<<<<<
 *             tz = pytz.timezone(tz)
 *         return _reso_local(stamps, tz)
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_IsInstance(__pyx_v_tz, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":2853
 *     if tz is not None:
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)             # <<<<<<<<<<<<<<
 *         return _reso_local(stamps, tz)
 *     else:
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__timezone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_tz);
      __pyx_v_tz = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/tslib.pyx":2854
 *         if isinstance(tz, basestring):
 *             tz = pytz.timezone(tz)
 *         return _reso_local(stamps, tz)             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(n):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __pyx_f_6pandas_5tslib__reso_local(((PyArrayObject *)__pyx_v_stamps), __pyx_v_tz); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2856
 *         return _reso_local(stamps, tz)
 *     else:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 continue
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "pandas/tslib.pyx":2857
 *     else:
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_8 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_8 < 0) {
        __pyx_t_8 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2858
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)
 */
        goto __pyx_L5_continue;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "pandas/tslib.pyx":2859
 *             if stamps[i] == NPY_NAT:
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:
 */
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2860
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)             # <<<<<<<<<<<<<<
 *             if curr_reso < reso:
 *                 reso = curr_reso
 */
      __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts));

      /* "pandas/tslib.pyx":2861
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:             # <<<<<<<<<<<<<<
 *                 reso = curr_reso
 *         return reso
 */
      __pyx_t_4 = (__pyx_v_curr_reso < __pyx_v_reso);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2862
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:
 *                 reso = curr_reso             # <<<<<<<<<<<<<<
 *         return reso
 * 
 */
        __pyx_v_reso = __pyx_v_curr_reso;
        goto __pyx_L8;
      }
      __pyx_L8:;
      __pyx_L5_continue:;
    }

    /* "pandas/tslib.pyx":2863
 *             if curr_reso < reso:
 *                 reso = curr_reso
 *         return reso             # <<<<<<<<<<<<<<
 * 
 * US_RESO = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyInt_FromLong(__pyx_v_reso); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __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_stamps.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_95resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_stamps = 0;
  PyObject *__pyx_v_tz = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resolution (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stamps,&__pyx_n_s__tz,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":2845
 *     return ordinals
 * 
 * cpdef resolution(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stamps)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tz);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resolution") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __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_stamps = ((PyArrayObject *)values[0]);
    __pyx_v_tz = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("resolution", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.resolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stamps), __pyx_ptype_5numpy_ndarray, 1, "stamps", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_94resolution(__pyx_self, __pyx_v_stamps, __pyx_v_tz);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_94resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6pandas_5tslib_resolution __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("resolution", 0);
  __pyx_pybuffer_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.tz = __pyx_v_tz;
  __pyx_t_1 = __pyx_f_6pandas_5tslib_resolution(__pyx_v_stamps, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "pandas/tslib.pyx":2871
 * D_RESO = 4
 * 
 * cdef inline int _reso_stamp(pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     if dts.us != 0:
 *         return US_RESO
 */

static CYTHON_INLINE int __pyx_f_6pandas_5tslib__reso_stamp(pandas_datetimestruct *__pyx_v_dts) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_reso_stamp", 0);

  /* "pandas/tslib.pyx":2872
 * 
 * cdef inline int _reso_stamp(pandas_datetimestruct *dts):
 *     if dts.us != 0:             # <<<<<<<<<<<<<<
 *         return US_RESO
 *     elif dts.sec != 0:
 */
  __pyx_t_1 = (__pyx_v_dts->us != 0);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2873
 * cdef inline int _reso_stamp(pandas_datetimestruct *dts):
 *     if dts.us != 0:
 *         return US_RESO             # <<<<<<<<<<<<<<
 *     elif dts.sec != 0:
 *         return S_RESO
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__US_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2874
 *     if dts.us != 0:
 *         return US_RESO
 *     elif dts.sec != 0:             # <<<<<<<<<<<<<<
 *         return S_RESO
 *     elif dts.min != 0:
 */
  __pyx_t_1 = (__pyx_v_dts->sec != 0);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2875
 *         return US_RESO
 *     elif dts.sec != 0:
 *         return S_RESO             # <<<<<<<<<<<<<<
 *     elif dts.min != 0:
 *         return T_RESO
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__S_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2876
 *     elif dts.sec != 0:
 *         return S_RESO
 *     elif dts.min != 0:             # <<<<<<<<<<<<<<
 *         return T_RESO
 *     elif dts.hour != 0:
 */
  __pyx_t_1 = (__pyx_v_dts->min != 0);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2877
 *         return S_RESO
 *     elif dts.min != 0:
 *         return T_RESO             # <<<<<<<<<<<<<<
 *     elif dts.hour != 0:
 *         return H_RESO
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__T_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2878
 *     elif dts.min != 0:
 *         return T_RESO
 *     elif dts.hour != 0:             # <<<<<<<<<<<<<<
 *         return H_RESO
 *     return D_RESO
 */
  __pyx_t_1 = (__pyx_v_dts->hour != 0);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2879
 *         return T_RESO
 *     elif dts.hour != 0:
 *         return H_RESO             # <<<<<<<<<<<<<<
 *     return D_RESO
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__H_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2880
 *     elif dts.hour != 0:
 *         return H_RESO
 *     return D_RESO             # <<<<<<<<<<<<<<
 * 
 * cdef _reso_local(ndarray[int64_t] stamps, object tz):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("pandas.tslib._reso_stamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2882
 *     return D_RESO
 * 
 * cdef _reso_local(ndarray[int64_t] stamps, object tz):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t n = len(stamps)
 */

static PyObject *__pyx_f_6pandas_5tslib__reso_local(PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz) {
  Py_ssize_t __pyx_v_n;
  int __pyx_v_reso;
  int __pyx_v_curr_reso;
  PyArrayObject *__pyx_v_trans = 0;
  PyArrayObject *__pyx_v_deltas = 0;
  PyArrayObject *__pyx_v_pos = 0;
  pandas_datetimestruct __pyx_v_dts;
  Py_ssize_t __pyx_v_i;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  PyObject *__pyx_v_delta = NULL;
  PyObject *__pyx_v__pos = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_deltas;
  __Pyx_Buffer __pyx_pybuffer_deltas;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos;
  __Pyx_Buffer __pyx_pybuffer_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_stamps;
  __Pyx_Buffer __pyx_pybuffer_stamps;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_trans;
  __Pyx_Buffer __pyx_pybuffer_trans;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  npy_datetime __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  long __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  __pyx_t_5numpy_int64_t __pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_reso_local", 0);
  __pyx_pybuffer_trans.pybuffer.buf = NULL;
  __pyx_pybuffer_trans.refcount = 0;
  __pyx_pybuffernd_trans.data = NULL;
  __pyx_pybuffernd_trans.rcbuffer = &__pyx_pybuffer_trans;
  __pyx_pybuffer_deltas.pybuffer.buf = NULL;
  __pyx_pybuffer_deltas.refcount = 0;
  __pyx_pybuffernd_deltas.data = NULL;
  __pyx_pybuffernd_deltas.rcbuffer = &__pyx_pybuffer_deltas;
  __pyx_pybuffer_pos.pybuffer.buf = NULL;
  __pyx_pybuffer_pos.refcount = 0;
  __pyx_pybuffernd_pos.data = NULL;
  __pyx_pybuffernd_pos.rcbuffer = &__pyx_pybuffer_pos;
  __pyx_pybuffer_stamps.pybuffer.buf = NULL;
  __pyx_pybuffer_stamps.refcount = 0;
  __pyx_pybuffernd_stamps.data = NULL;
  __pyx_pybuffernd_stamps.rcbuffer = &__pyx_pybuffer_stamps;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer, (PyObject*)__pyx_v_stamps, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_stamps.diminfo[0].strides = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_stamps.diminfo[0].shape = __pyx_pybuffernd_stamps.rcbuffer->pybuffer.shape[0];

  /* "pandas/tslib.pyx":2884
 * cdef _reso_local(ndarray[int64_t] stamps, object tz):
 *     cdef:
 *         Py_ssize_t n = len(stamps)             # <<<<<<<<<<<<<<
 *         int reso = D_RESO, curr_reso
 *         ndarray[int64_t] trans, deltas, pos
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_stamps)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2885
 *     cdef:
 *         Py_ssize_t n = len(stamps)
 *         int reso = D_RESO, curr_reso             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] trans, deltas, pos
 *         pandas_datetimestruct dts
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__D_RESO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reso = __pyx_t_3;

  /* "pandas/tslib.pyx":2889
 *         pandas_datetimestruct dts
 * 
 *     if _is_utc(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 */
  __pyx_t_4 = __pyx_f_6pandas_5tslib__is_utc(__pyx_v_tz);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2890
 * 
 *     if _is_utc(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 continue
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pandas/tslib.pyx":2891
 *     if _is_utc(tz):
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 */
      __pyx_t_6 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_6 < 0) {
        __pyx_t_6 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2892
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)
 */
        goto __pyx_L4_continue;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "pandas/tslib.pyx":2893
 *             if stamps[i] == NPY_NAT:
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:
 */
      __pyx_t_7 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_7 < 0) {
        __pyx_t_7 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2894
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)             # <<<<<<<<<<<<<<
 *             if curr_reso < reso:
 *                 reso = curr_reso
 */
      __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts));

      /* "pandas/tslib.pyx":2895
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:             # <<<<<<<<<<<<<<
 *                 reso = curr_reso
 *     elif _is_tzlocal(tz):
 */
      __pyx_t_4 = (__pyx_v_curr_reso < __pyx_v_reso);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2896
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:
 *                 reso = curr_reso             # <<<<<<<<<<<<<<
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 */
        __pyx_v_reso = __pyx_v_curr_reso;
        goto __pyx_L7;
      }
      __pyx_L7:;
      __pyx_L4_continue:;
    }
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":2897
 *             if curr_reso < reso:
 *                 reso = curr_reso
 *     elif _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___is_tzlocal); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_tz);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tz);
  __Pyx_GIVEREF(__pyx_v_tz);
  __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2898
 *                 reso = curr_reso
 *     elif _is_tzlocal(tz):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if stamps[i] == NPY_NAT:
 *                 continue
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pandas/tslib.pyx":2899
 *     elif _is_tzlocal(tz):
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 */
      __pyx_t_10 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_10 < 0) {
        __pyx_t_10 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2900
 *         for i in range(n):
 *             if stamps[i] == NPY_NAT:
 *                 continue             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)
 */
        goto __pyx_L8_continue;
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "pandas/tslib.pyx":2901
 *             if stamps[i] == NPY_NAT:
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,             # <<<<<<<<<<<<<<
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "pandas/tslib.pyx":2902
 *                 continue
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)             # <<<<<<<<<<<<<<
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 */
      pandas_datetime_to_datetimestruct((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_stamps.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2903
 *             pandas_datetime_to_datetimestruct(stamps[i], PANDAS_FR_ns,
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,             # <<<<<<<<<<<<<<
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 */
      __pyx_t_9 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_dts.year); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.month); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.day); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.hour); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);

      /* "pandas/tslib.pyx":2904
 *                                               &dts)
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)             # <<<<<<<<<<<<<<
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 */
      __pyx_t_13 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.min); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.sec); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_dts.us); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __pyx_t_9 = 0;
      __pyx_t_8 = 0;
      __pyx_t_2 = 0;
      __pyx_t_12 = 0;
      __pyx_t_13 = 0;
      __pyx_t_14 = 0;
      __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
      __Pyx_XDECREF(((PyObject *)__pyx_v_dt));
      __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_15);
      __pyx_t_15 = 0;

      /* "pandas/tslib.pyx":2905
 *             dt = datetime(dts.year, dts.month, dts.day, dts.hour,
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000             # <<<<<<<<<<<<<<
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)
 */
      __pyx_t_15 = __pyx_f_6pandas_5tslib__get_utcoffset(__pyx_v_tz, ((PyObject *)__pyx_v_dt), 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyFloat_FromDouble(__pyx_f_6pandas_5tslib_total_seconds(__pyx_t_15)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_16);
      __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __pyx_t_15 = PyNumber_Multiply(__pyx_t_16, __pyx_int_1000000000); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_v_delta);
      __pyx_v_delta = __pyx_t_15;
      __pyx_t_15 = 0;

      /* "pandas/tslib.pyx":2906
 *                           dts.min, dts.sec, dts.us, tz)
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,             # <<<<<<<<<<<<<<
 *                                               PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_stamps.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_stamps.diminfo[0].strides))); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyNumber_Add(__pyx_t_15, __pyx_v_delta); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_18 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_16); if (unlikely((__pyx_t_18 == (npy_datetime)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":2907
 *             delta = int(total_seconds(_get_utcoffset(tz, dt))) * 1000000000
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:
 */
      pandas_datetime_to_datetimestruct(__pyx_t_18, PANDAS_FR_ns, (&__pyx_v_dts));

      /* "pandas/tslib.pyx":2908
 *             pandas_datetime_to_datetimestruct(stamps[i] + delta,
 *                                               PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)             # <<<<<<<<<<<<<<
 *             if curr_reso < reso:
 *                 reso = curr_reso
 */
      __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts));

      /* "pandas/tslib.pyx":2909
 *                                               PANDAS_FR_ns, &dts)
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:             # <<<<<<<<<<<<<<
 *                 reso = curr_reso
 *     else:
 */
      __pyx_t_4 = (__pyx_v_curr_reso < __pyx_v_reso);
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2910
 *             curr_reso = _reso_stamp(&dts)
 *             if curr_reso < reso:
 *                 reso = curr_reso             # <<<<<<<<<<<<<<
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 */
        __pyx_v_reso = __pyx_v_curr_reso;
        goto __pyx_L11;
      }
      __pyx_L11:;
      __pyx_L8_continue:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2913
 *     else:
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)             # <<<<<<<<<<<<<<
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 */
    __pyx_t_16 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_transitions); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_14 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
    if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_19 = ((PyArrayObject *)__pyx_t_14);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_trans.rcbuffer->pybuffer, (PyObject*)__pyx_v_trans, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_22);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
        }
      }
      __pyx_pybuffernd_trans.diminfo[0].strides = __pyx_pybuffernd_trans.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_trans.diminfo[0].shape = __pyx_pybuffernd_trans.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = 0;
    __pyx_v_trans = ((PyArrayObject *)__pyx_t_14);
    __pyx_t_14 = 0;

    /* "pandas/tslib.pyx":2914
 *         # Adjust datetime64 timestamp, recompute datetimestruct
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)             # <<<<<<<<<<<<<<
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:
 */
    __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_deltas); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_INCREF(__pyx_v_tz);
    PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    __pyx_t_16 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
    if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_19 = ((PyArrayObject *)__pyx_t_16);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer, (PyObject*)__pyx_v_deltas, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_22); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_22, __pyx_t_21, __pyx_t_20);
        }
      }
      __pyx_pybuffernd_deltas.diminfo[0].strides = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_deltas.diminfo[0].shape = __pyx_pybuffernd_deltas.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = 0;
    __pyx_v_deltas = ((PyArrayObject *)__pyx_t_16);
    __pyx_t_16 = 0;

    /* "pandas/tslib.pyx":2915
 *         trans = _get_transitions(tz)
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1             # <<<<<<<<<<<<<<
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)
 */
    __pyx_t_16 = PyObject_GetAttr(((PyObject *)__pyx_v_trans), __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_INCREF(((PyObject *)__pyx_v_stamps));
    PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_stamps));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_stamps));
    __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_14));
    if (PyDict_SetItem(__pyx_t_14, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_15), ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
    __pyx_t_14 = PyNumber_Subtract(__pyx_t_13, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_v__pos = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "pandas/tslib.pyx":2916
 *         deltas = _get_deltas(tz)
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:             # <<<<<<<<<<<<<<
 *             _pos = _pos.astype(np.int64)
 *         pos = _pos
 */
    __pyx_t_14 = PyObject_GetAttr(__pyx_v__pos, __pyx_n_s__dtype); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_15 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__int64); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = PyObject_RichCompare(__pyx_t_14, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":2917
 *         _pos = trans.searchsorted(stamps, side='right') - 1
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)             # <<<<<<<<<<<<<<
 *         pos = _pos
 * 
 */
      __pyx_t_13 = PyObject_GetAttr(__pyx_v__pos, __pyx_n_s__astype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_14 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__int64); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      __pyx_t_14 = 0;
      __pyx_t_14 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_v__pos);
      __pyx_v__pos = __pyx_t_14;
      __pyx_t_14 = 0;
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "pandas/tslib.pyx":2918
 *         if _pos.dtype != np.int64:
 *             _pos = _pos.astype(np.int64)
 *         pos = _pos             # <<<<<<<<<<<<<<
 * 
 *         # statictzinfo
 */
    if (!(likely(((__pyx_v__pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__pos, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_19 = ((PyArrayObject *)__pyx_v__pos);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_22);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
        }
      }
      __pyx_pybuffernd_pos.diminfo[0].strides = __pyx_pybuffernd_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos.diminfo[0].shape = __pyx_pybuffernd_pos.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_19 = 0;
    __Pyx_INCREF(__pyx_v__pos);
    __pyx_v_pos = ((PyArrayObject *)__pyx_v__pos);

    /* "pandas/tslib.pyx":2921
 * 
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 */
    __pyx_t_14 = ((PyObject *)__pyx_n_s___transition_info);
    __Pyx_INCREF(__pyx_t_14);
    __pyx_t_4 = PyObject_HasAttr(__pyx_v_tz, __pyx_t_14); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_23 = (!__pyx_t_4);
    if (__pyx_t_23) {

      /* "pandas/tslib.pyx":2922
 *         # statictzinfo
 *         if not hasattr(tz, '_transition_info'):
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if stamps[i] == NPY_NAT:
 *                     continue
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "pandas/tslib.pyx":2923
 *         if not hasattr(tz, '_transition_info'):
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 */
        __pyx_t_24 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_23) {

          /* "pandas/tslib.pyx":2924
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 *                     continue             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)
 */
          goto __pyx_L14_continue;
          goto __pyx_L16;
        }
        __pyx_L16:;

        /* "pandas/tslib.pyx":2925
 *                 if stamps[i] == NPY_NAT:
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],             # <<<<<<<<<<<<<<
 *                                                   PANDAS_FR_ns, &dts)
 *                 curr_reso = _reso_stamp(&dts)
 */
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_26 = 0;
        __pyx_t_3 = -1;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2926
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 curr_reso = _reso_stamp(&dts)
 *                 if curr_reso < reso:
 */
        pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2927
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[0],
 *                                                   PANDAS_FR_ns, &dts)
 *                 curr_reso = _reso_stamp(&dts)             # <<<<<<<<<<<<<<
 *                 if curr_reso < reso:
 *                     reso = curr_reso
 */
        __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts));

        /* "pandas/tslib.pyx":2928
 *                                                   PANDAS_FR_ns, &dts)
 *                 curr_reso = _reso_stamp(&dts)
 *                 if curr_reso < reso:             # <<<<<<<<<<<<<<
 *                     reso = curr_reso
 *         else:
 */
        __pyx_t_23 = (__pyx_v_curr_reso < __pyx_v_reso);
        if (__pyx_t_23) {

          /* "pandas/tslib.pyx":2929
 *                 curr_reso = _reso_stamp(&dts)
 *                 if curr_reso < reso:
 *                     reso = curr_reso             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(n):
 */
          __pyx_v_reso = __pyx_v_curr_reso;
          goto __pyx_L17;
        }
        __pyx_L17:;
        __pyx_L14_continue:;
      }
      goto __pyx_L13;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2931
 *                     reso = curr_reso
 *         else:
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 if stamps[i] == NPY_NAT:
 *                     continue
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "pandas/tslib.pyx":2932
 *         else:
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 */
        __pyx_t_27 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_27 < 0) {
          __pyx_t_27 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_stamps.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_23) {

          /* "pandas/tslib.pyx":2933
 *             for i in range(n):
 *                 if stamps[i] == NPY_NAT:
 *                     continue             # <<<<<<<<<<<<<<
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)
 */
          goto __pyx_L18_continue;
          goto __pyx_L20;
        }
        __pyx_L20:;

        /* "pandas/tslib.pyx":2934
 *                 if stamps[i] == NPY_NAT:
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],             # <<<<<<<<<<<<<<
 *                                                   PANDAS_FR_ns, &dts)
 *                 curr_reso = _reso_stamp(&dts)
 */
        __pyx_t_28 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_28 < 0) {
          __pyx_t_28 += __pyx_pybuffernd_stamps.diminfo[0].shape;
          if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_stamps.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_29 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_29 < 0) {
          __pyx_t_29 += __pyx_pybuffernd_pos.diminfo[0].shape;
          if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_pos.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_pos.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_pos.diminfo[0].strides));
        __pyx_t_3 = -1;
        if (__pyx_t_30 < 0) {
          __pyx_t_30 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_deltas.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2935
 *                     continue
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 curr_reso = _reso_stamp(&dts)
 *                 if curr_reso < reso:
 */
        pandas_datetime_to_datetimestruct(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_stamps.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_stamps.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_deltas.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_deltas.diminfo[0].strides))), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2936
 *                 pandas_datetime_to_datetimestruct(stamps[i] + deltas[pos[i]],
 *                                                   PANDAS_FR_ns, &dts)
 *                 curr_reso = _reso_stamp(&dts)             # <<<<<<<<<<<<<<
 *                 if curr_reso < reso:
 *                     reso = curr_reso
 */
        __pyx_v_curr_reso = __pyx_f_6pandas_5tslib__reso_stamp((&__pyx_v_dts));

        /* "pandas/tslib.pyx":2937
 *                                                   PANDAS_FR_ns, &dts)
 *                 curr_reso = _reso_stamp(&dts)
 *                 if curr_reso < reso:             # <<<<<<<<<<<<<<
 *                     reso = curr_reso
 * 
 */
        __pyx_t_23 = (__pyx_v_curr_reso < __pyx_v_reso);
        if (__pyx_t_23) {

          /* "pandas/tslib.pyx":2938
 *                 curr_reso = _reso_stamp(&dts)
 *                 if curr_reso < reso:
 *                     reso = curr_reso             # <<<<<<<<<<<<<<
 * 
 *     return reso
 */
          __pyx_v_reso = __pyx_v_curr_reso;
          goto __pyx_L21;
        }
        __pyx_L21:;
        __pyx_L18_continue:;
      }
    }
    __pyx_L13:;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2940
 *                     reso = curr_reso
 * 
 *     return reso             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_14 = PyInt_FromLong(__pyx_v_reso); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_r = __pyx_t_14;
  __pyx_t_14 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas.tslib._reso_local", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_deltas.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_stamps.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_trans.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_trans);
  __Pyx_XDECREF((PyObject *)__pyx_v_deltas);
  __Pyx_XDECREF((PyObject *)__pyx_v_pos);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_delta);
  __Pyx_XDECREF(__pyx_v__pos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_97_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_97_getlang = {__Pyx_NAMESTR("_getlang"), (PyCFunction)__pyx_pw_6pandas_5tslib_97_getlang, METH_NOARGS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_97_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getlang (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_96_getlang(__pyx_self);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2979
 * __all__ = []
 * 
 * def _getlang():             # <<<<<<<<<<<<<<
 *     # Figure out what the current language is set to.
 *     return locale.getlocale(locale.LC_TIME)
 */

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

  /* "pandas/tslib.pyx":2981
 * def _getlang():
 *     # Figure out what the current language is set to.
 *     return locale.getlocale(locale.LC_TIME)             # <<<<<<<<<<<<<<
 * 
 * class LocaleTime(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__locale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__getlocale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __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_GetName(__pyx_m, __pyx_n_s__locale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__LC_TIME); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_6pandas_5tslib_10LocaleTime___init__[] = "Set all attributes.\n\n        Order of methods called matters for dependency reasons.\n\n        The locale language is set at the offset and then checked again before\n        exiting.  This is to make sure that the attributes were not set with a\n        mix of information from more than one locale.  This would most likely\n        happen when using threads where one thread calls a locale-dependent\n        function while another thread changes the locale while the function in\n        the other thread is still running.  Proper coding would call for\n        locks to prevent changing the locale while locale-dependent code is\n        running.  The check here is done in case someone does not think about\n        doing this.\n\n        Only other possible issue is if someone changed the timezone and did\n        not call tz.tzset .  That is an issue for the programmer, though,\n        since changing the timezone is worthless without that call.\n\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_10LocaleTime___init__)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime___init__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3002
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Set all attributes.
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pandas/tslib.pyx":3022
 * 
 *         """
 *         self.lang = _getlang()             # <<<<<<<<<<<<<<
 *         self.__calc_weekday()
 *         self.__calc_month()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___getlang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__lang, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3023
 *         """
 *         self.lang = _getlang()
 *         self.__calc_weekday()             # <<<<<<<<<<<<<<
 *         self.__calc_month()
 *         self.__calc_am_pm()
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_149); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __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_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3024
 *         self.lang = _getlang()
 *         self.__calc_weekday()
 *         self.__calc_month()             # <<<<<<<<<<<<<<
 *         self.__calc_am_pm()
 *         self.__calc_timezone()
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_150); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __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_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3025
 *         self.__calc_weekday()
 *         self.__calc_month()
 *         self.__calc_am_pm()             # <<<<<<<<<<<<<<
 *         self.__calc_timezone()
 *         self.__calc_date_time()
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_151); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __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_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3026
 *         self.__calc_month()
 *         self.__calc_am_pm()
 *         self.__calc_timezone()             # <<<<<<<<<<<<<<
 *         self.__calc_date_time()
 *         if _getlang() != self.lang:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_152); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __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_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3027
 *         self.__calc_am_pm()
 *         self.__calc_timezone()
 *         self.__calc_date_time()             # <<<<<<<<<<<<<<
 *         if _getlang() != self.lang:
 *             raise ValueError("locale changed during initialization")
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_153); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3027; __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_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3028
 *         self.__calc_timezone()
 *         self.__calc_date_time()
 *         if _getlang() != self.lang:             # <<<<<<<<<<<<<<
 *             raise ValueError("locale changed during initialization")
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___getlang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__lang); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":3029
 *         self.__calc_date_time()
 *         if _getlang() != self.lang:
 *             raise ValueError("locale changed during initialization")             # <<<<<<<<<<<<<<
 * 
 *     def __pad(self, seq, front):
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_155), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_3__pad = {__Pyx_NAMESTR("__pad"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_3__pad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_front = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pad (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__seq,&__pyx_n_s__front,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__front)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pad") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __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_self = values[0];
    __pyx_v_seq = values[1];
    __pyx_v_front = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pad", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__pad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(__pyx_self, __pyx_v_self, __pyx_v_seq, __pyx_v_front);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3031
 *             raise ValueError("locale changed during initialization")
 * 
 *     def __pad(self, seq, front):             # <<<<<<<<<<<<<<
 *         # Add '' to seq to either the front (is True), else the back.
 *         seq = list(seq)
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_2__pad(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_front) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pad", 0);
  __Pyx_INCREF(__pyx_v_seq);

  /* "pandas/tslib.pyx":3033
 *     def __pad(self, seq, front):
 *         # Add '' to seq to either the front (is True), else the back.
 *         seq = list(seq)             # <<<<<<<<<<<<<<
 *         if front:
 *             seq.insert(0, '')
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_seq);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_seq);
  __Pyx_GIVEREF(__pyx_v_seq);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_seq);
  __pyx_v_seq = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3034
 *         # Add '' to seq to either the front (is True), else the back.
 *         seq = list(seq)
 *         if front:             # <<<<<<<<<<<<<<
 *             seq.insert(0, '')
 *         else:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_front); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":3035
 *         seq = list(seq)
 *         if front:
 *             seq.insert(0, '')             # <<<<<<<<<<<<<<
 *         else:
 *             seq.append('')
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_seq, __pyx_n_s__insert); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_156), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __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_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3037
 *             seq.insert(0, '')
 *         else:
 *             seq.append('')             # <<<<<<<<<<<<<<
 *         return seq
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_seq, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3038
 *         else:
 *             seq.append('')
 *         return seq             # <<<<<<<<<<<<<<
 * 
 *     def __calc_weekday(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_seq);
  __pyx_r = __pyx_v_seq;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__pad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_5__calc_weekday = {__Pyx_NAMESTR("__calc_weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_5__calc_weekday(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__calc_weekday (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3040
 *         return seq
 * 
 *     def __calc_weekday(self):             # <<<<<<<<<<<<<<
 *         # Set self.a_weekday and self.f_weekday using the calendar
 *         # module.
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_4__calc_weekday(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_a_weekday = NULL;
  PyObject *__pyx_v_f_weekday = NULL;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__calc_weekday", 0);

  /* "pandas/tslib.pyx":3043
 *         # Set self.a_weekday and self.f_weekday using the calendar
 *         # module.
 *         a_weekday = [calendar.day_abbr[i].lower() for i in range(7)]             # <<<<<<<<<<<<<<
 *         f_weekday = [calendar.day_name[i].lower() for i in range(7)]
 *         self.a_weekday = a_weekday
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  for (__pyx_t_2 = 0; __pyx_t_2 < 7; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__day_abbr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = ((PyObject *)__pyx_t_1);
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_a_weekday = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3044
 *         # module.
 *         a_weekday = [calendar.day_abbr[i].lower() for i in range(7)]
 *         f_weekday = [calendar.day_name[i].lower() for i in range(7)]             # <<<<<<<<<<<<<<
 *         self.a_weekday = a_weekday
 *         self.f_weekday = f_weekday
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  for (__pyx_t_2 = 0; __pyx_t_2 < 7; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__calendar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__day_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = ((PyObject *)__pyx_t_3);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_f_weekday = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3045
 *         a_weekday = [calendar.day_abbr[i].lower() for i in range(7)]
 *         f_weekday = [calendar.day_name[i].lower() for i in range(7)]
 *         self.a_weekday = a_weekday             # <<<<<<<<<<<<<<
 *         self.f_weekday = f_weekday
 * 
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__a_weekday, ((PyObject *)__pyx_v_a_weekday)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3046
 *         f_weekday = [calendar.day_name[i].lower() for i in range(7)]
 *         self.a_weekday = a_weekday
 *         self.f_weekday = f_weekday             # <<<<<<<<<<<<<<
 * 
 *     def __calc_month(self):
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__f_weekday, ((PyObject *)__pyx_v_f_weekday)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a_weekday);
  __Pyx_XDECREF(__pyx_v_f_weekday);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_7__calc_month = {__Pyx_NAMESTR("__calc_month"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_7__calc_month(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__calc_month (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3048
 *         self.f_weekday = f_weekday
 * 
 *     def __calc_month(self):             # <<<<<<<<<<<<<<
 *         # Set self.f_month and self.a_month using the calendar module.
 *         a_month = [calendar.month_abbr[i].lower() for i in range(13)]
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_6__calc_month(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_a_month = NULL;
  PyObject *__pyx_v_f_month = NULL;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__calc_month", 0);

  /* "pandas/tslib.pyx":3050
 *     def __calc_month(self):
 *         # Set self.f_month and self.a_month using the calendar module.
 *         a_month = [calendar.month_abbr[i].lower() for i in range(13)]             # <<<<<<<<<<<<<<
 *         f_month = [calendar.month_name[i].lower() for i in range(13)]
 *         self.a_month = a_month
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  for (__pyx_t_2 = 0; __pyx_t_2 < 13; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__month_abbr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = ((PyObject *)__pyx_t_1);
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_a_month = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3051
 *         # Set self.f_month and self.a_month using the calendar module.
 *         a_month = [calendar.month_abbr[i].lower() for i in range(13)]
 *         f_month = [calendar.month_name[i].lower() for i in range(13)]             # <<<<<<<<<<<<<<
 *         self.a_month = a_month
 *         self.f_month = f_month
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  for (__pyx_t_2 = 0; __pyx_t_2 < 13; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__calendar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__month_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = ((PyObject *)__pyx_t_3);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_f_month = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3052
 *         a_month = [calendar.month_abbr[i].lower() for i in range(13)]
 *         f_month = [calendar.month_name[i].lower() for i in range(13)]
 *         self.a_month = a_month             # <<<<<<<<<<<<<<
 *         self.f_month = f_month
 * 
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__a_month, ((PyObject *)__pyx_v_a_month)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3053
 *         f_month = [calendar.month_name[i].lower() for i in range(13)]
 *         self.a_month = a_month
 *         self.f_month = f_month             # <<<<<<<<<<<<<<
 * 
 *     def __calc_am_pm(self):
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__f_month, ((PyObject *)__pyx_v_f_month)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a_month);
  __Pyx_XDECREF(__pyx_v_f_month);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_9__calc_am_pm = {__Pyx_NAMESTR("__calc_am_pm"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_9__calc_am_pm(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__calc_am_pm (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3055
 *         self.f_month = f_month
 * 
 *     def __calc_am_pm(self):             # <<<<<<<<<<<<<<
 *         # Set self.am_pm by using time.strftime().
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_8__calc_am_pm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_am_pm = NULL;
  PyObject *__pyx_v_hour = NULL;
  PyObject *__pyx_v_time_tuple = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__calc_am_pm", 0);

  /* "pandas/tslib.pyx":3061
 *         # magical; just happened to have used it everywhere else where a
 *         # static date was needed.
 *         am_pm = []             # <<<<<<<<<<<<<<
 *         for hour in (01,22):
 *             time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_am_pm = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3062
 *         # static date was needed.
 *         am_pm = []
 *         for hour in (01,22):             # <<<<<<<<<<<<<<
 *             time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))
 *             am_pm.append(time.strftime("%p", time_tuple).lower())
 */
  __pyx_t_1 = ((PyObject *)__pyx_k_tuple_157); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_hour);
    __pyx_v_hour = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":3063
 *         am_pm = []
 *         for hour in (01,22):
 *             time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))             # <<<<<<<<<<<<<<
 *             am_pm.append(time.strftime("%p", time_tuple).lower())
 *         self.am_pm = am_pm
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_1999);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1999);
    __Pyx_GIVEREF(__pyx_int_1999);
    __Pyx_INCREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    __Pyx_INCREF(__pyx_int_17);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_17);
    __Pyx_GIVEREF(__pyx_int_17);
    __Pyx_INCREF(__pyx_v_hour);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_hour);
    __Pyx_GIVEREF(__pyx_v_hour);
    __Pyx_INCREF(__pyx_int_44);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_int_44);
    __Pyx_GIVEREF(__pyx_int_44);
    __Pyx_INCREF(__pyx_int_55);
    PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_int_55);
    __Pyx_GIVEREF(__pyx_int_55);
    __Pyx_INCREF(__pyx_int_2);
    PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    __Pyx_INCREF(__pyx_int_76);
    PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_int_76);
    __Pyx_GIVEREF(__pyx_int_76);
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_time_tuple);
    __pyx_v_time_tuple = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":3064
 *         for hour in (01,22):
 *             time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))
 *             am_pm.append(time.strftime("%p", time_tuple).lower())             # <<<<<<<<<<<<<<
 *         self.am_pm = am_pm
 * 
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strftime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_158));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_158));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_158));
    __Pyx_INCREF(__pyx_v_time_tuple);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple);
    __Pyx_GIVEREF(__pyx_v_time_tuple);
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = PyList_Append(__pyx_v_am_pm, __pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3065
 *             time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))
 *             am_pm.append(time.strftime("%p", time_tuple).lower())
 *         self.am_pm = am_pm             # <<<<<<<<<<<<<<
 * 
 *     def __calc_date_time(self):
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__am_pm, ((PyObject *)__pyx_v_am_pm)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_am_pm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_am_pm);
  __Pyx_XDECREF(__pyx_v_hour);
  __Pyx_XDECREF(__pyx_v_time_tuple);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_11__calc_date_time = {__Pyx_NAMESTR("__calc_date_time"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_11__calc_date_time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__calc_date_time (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3067
 *         self.am_pm = am_pm
 * 
 *     def __calc_date_time(self):             # <<<<<<<<<<<<<<
 *         # Set self.date_time, self.date, & self.time by using
 *         # time.strftime().
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_10__calc_date_time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_time_tuple = NULL;
  PyObject *__pyx_v_date_time = NULL;
  PyObject *__pyx_v_replacement_pairs = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_directive = NULL;
  PyObject *__pyx_v_current_format = NULL;
  PyObject *__pyx_v_old = NULL;
  PyObject *__pyx_v_new = NULL;
  PyObject *__pyx_v_U_W = NULL;
  PyObject *__pyx_v_tz_values = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__calc_date_time", 0);

  /* "pandas/tslib.pyx":3075
 *         # values within the format string is very important; it eliminates
 *         # possible ambiguity for what something represents.
 *         time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0))             # <<<<<<<<<<<<<<
 *         date_time = [None, None, None]
 *         date_time[0] = time.strftime("%c", time_tuple).lower()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_160), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_time_tuple = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3076
 *         # possible ambiguity for what something represents.
 *         time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0))
 *         date_time = [None, None, None]             # <<<<<<<<<<<<<<
 *         date_time[0] = time.strftime("%c", time_tuple).lower()
 *         date_time[1] = time.strftime("%x", time_tuple).lower()
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_1, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_t_1, 2, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_v_date_time = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3077
 *         time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0))
 *         date_time = [None, None, None]
 *         date_time[0] = time.strftime("%c", time_tuple).lower()             # <<<<<<<<<<<<<<
 *         date_time[1] = time.strftime("%x", time_tuple).lower()
 *         date_time[2] = time.strftime("%X", time_tuple).lower()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strftime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_161));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_161));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_161));
  __Pyx_INCREF(__pyx_v_time_tuple);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_time_tuple);
  __Pyx_GIVEREF(__pyx_v_time_tuple);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__lower); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetItemInt(((PyObject *)__pyx_v_date_time), 0, __pyx_t_3, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3078
 *         date_time = [None, None, None]
 *         date_time[0] = time.strftime("%c", time_tuple).lower()
 *         date_time[1] = time.strftime("%x", time_tuple).lower()             # <<<<<<<<<<<<<<
 *         date_time[2] = time.strftime("%X", time_tuple).lower()
 *         replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'),
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_162));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_162));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_162));
  __Pyx_INCREF(__pyx_v_time_tuple);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple);
  __Pyx_GIVEREF(__pyx_v_time_tuple);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemInt(((PyObject *)__pyx_v_date_time), 1, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3079
 *         date_time[0] = time.strftime("%c", time_tuple).lower()
 *         date_time[1] = time.strftime("%x", time_tuple).lower()
 *         date_time[2] = time.strftime("%X", time_tuple).lower()             # <<<<<<<<<<<<<<
 *         replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'),
 *                     (self.f_month[3], '%B'), (self.a_weekday[2], '%a'),
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__strftime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_163));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_163));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_163));
  __Pyx_INCREF(__pyx_v_time_tuple);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_time_tuple);
  __Pyx_GIVEREF(__pyx_v_time_tuple);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemInt(((PyObject *)__pyx_v_date_time), 2, __pyx_t_1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3080
 *         date_time[1] = time.strftime("%x", time_tuple).lower()
 *         date_time[2] = time.strftime("%X", time_tuple).lower()
 *         replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'),             # <<<<<<<<<<<<<<
 *                     (self.f_month[3], '%B'), (self.a_weekday[2], '%a'),
 *                     (self.a_month[3], '%b'), (self.am_pm[1], '%p'),
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__f_weekday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __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(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_166));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_166));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_166));
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3081
 *         date_time[2] = time.strftime("%X", time_tuple).lower()
 *         replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'),
 *                     (self.f_month[3], '%B'), (self.a_weekday[2], '%a'),             # <<<<<<<<<<<<<<
 *                     (self.a_month[3], '%b'), (self.am_pm[1], '%p'),
 *                     ('1999', '%Y'), ('99', '%y'), ('22', '%H'),
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__f_month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_167));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_167));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_167));
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__a_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __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_INCREF(((PyObject *)__pyx_kp_s_168));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_168));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_168));
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":3082
 *         replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'),
 *                     (self.f_month[3], '%B'), (self.a_weekday[2], '%a'),
 *                     (self.a_month[3], '%b'), (self.am_pm[1], '%p'),             # <<<<<<<<<<<<<<
 *                     ('1999', '%Y'), ('99', '%y'), ('22', '%H'),
 *                     ('44', '%M'), ('55', '%S'), ('76', '%j'),
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __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_INCREF(((PyObject *)__pyx_kp_s_169));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_kp_s_169));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_169));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_158));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_158));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_158));
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3087
 *                     ('17', '%d'), ('03', '%m'), ('3', '%m'),
 *                     # '3' needed for when no leading zero.
 *                     ('2', '%w'), ('10', '%I')]             # <<<<<<<<<<<<<<
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone
 *                                                 for tz in tz_values])
 */
  __pyx_t_6 = PyList_New(17); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_165));
  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_k_tuple_165));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_165));
  PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  PyList_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  PyList_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  PyList_SET_ITEM(__pyx_t_6, 5, ((PyObject *)__pyx_t_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_170));
  PyList_SET_ITEM(__pyx_t_6, 6, ((PyObject *)__pyx_k_tuple_170));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_172));
  PyList_SET_ITEM(__pyx_t_6, 7, ((PyObject *)__pyx_k_tuple_172));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_174));
  PyList_SET_ITEM(__pyx_t_6, 8, ((PyObject *)__pyx_k_tuple_174));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_176));
  PyList_SET_ITEM(__pyx_t_6, 9, ((PyObject *)__pyx_k_tuple_176));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_178));
  PyList_SET_ITEM(__pyx_t_6, 10, ((PyObject *)__pyx_k_tuple_178));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_180));
  PyList_SET_ITEM(__pyx_t_6, 11, ((PyObject *)__pyx_k_tuple_180));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_181));
  PyList_SET_ITEM(__pyx_t_6, 12, ((PyObject *)__pyx_k_tuple_181));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_183));
  PyList_SET_ITEM(__pyx_t_6, 13, ((PyObject *)__pyx_k_tuple_183));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_184));
  PyList_SET_ITEM(__pyx_t_6, 14, ((PyObject *)__pyx_k_tuple_184));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_186));
  PyList_SET_ITEM(__pyx_t_6, 15, ((PyObject *)__pyx_k_tuple_186));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_188));
  PyList_SET_ITEM(__pyx_t_6, 16, ((PyObject *)__pyx_k_tuple_188));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_v_replacement_pairs = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3088
 *                     # '3' needed for when no leading zero.
 *                     ('2', '%w'), ('10', '%I')]
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone             # <<<<<<<<<<<<<<
 *                                                 for tz in tz_values])
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_replacement_pairs), __pyx_n_s__extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__timezone); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF(__pyx_v_tz_values);
    __pyx_v_tz_values = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":3089
 *                     ('2', '%w'), ('10', '%I')]
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone
 *                                                 for tz in tz_values])             # <<<<<<<<<<<<<<
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):
 *             current_format = date_time[offset]
 */
    if (PyList_CheckExact(__pyx_v_tz_values) || PyTuple_CheckExact(__pyx_v_tz_values)) {
      __pyx_t_4 = __pyx_v_tz_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tz_values); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_4)) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_4)) {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF(__pyx_v_tz);
      __pyx_v_tz = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":3088
 *                     # '3' needed for when no leading zero.
 *                     ('2', '%w'), ('10', '%I')]
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone             # <<<<<<<<<<<<<<
 *                                                 for tz in tz_values])
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_tz);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tz);
      __Pyx_GIVEREF(__pyx_v_tz);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_189));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_189));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_189));
      if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3090
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone
 *                                                 for tz in tz_values])
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):             # <<<<<<<<<<<<<<
 *             current_format = date_time[offset]
 *             for old, new in replacement_pairs:
 */
  __pyx_t_5 = ((PyObject *)__pyx_k_tuple_193); __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L10_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_offset);
    __pyx_v_offset = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_directive);
    __pyx_v_directive = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":3091
 *                                                 for tz in tz_values])
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):
 *             current_format = date_time[offset]             # <<<<<<<<<<<<<<
 *             for old, new in replacement_pairs:
 *                 # Must deal with possible lack of locale info
 */
    __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_date_time), __pyx_v_offset); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_current_format);
    __pyx_v_current_format = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":3092
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):
 *             current_format = date_time[offset]
 *             for old, new in replacement_pairs:             # <<<<<<<<<<<<<<
 *                 # Must deal with possible lack of locale info
 *                 # manifesting itself as the empty string (e.g., Swedish's
 */
    __pyx_t_3 = ((PyObject *)__pyx_v_replacement_pairs); __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
        PyObject* sequence = __pyx_t_4;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext;
        index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L14_unpacking_done;
        __pyx_L13_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L14_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_old);
      __pyx_v_old = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_v_new);
      __pyx_v_new = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":3097
 *                 # lack of AM/PM info) or a platform returning a tuple of empty
 *                 # strings (e.g., MacOS 9 having timezone as ('','')).
 *                 if old:             # <<<<<<<<<<<<<<
 *                     current_format = current_format.replace(old, new)
 *             # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since
 */
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_old); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_12) {

        /* "pandas/tslib.pyx":3098
 *                 # strings (e.g., MacOS 9 having timezone as ('','')).
 *                 if old:
 *                     current_format = current_format.replace(old, new)             # <<<<<<<<<<<<<<
 *             # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since
 *             # 2005-01-03 occurs before the first Monday of the year.  Otherwise
 */
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_current_format, __pyx_n_s__replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_old);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_old);
        __Pyx_GIVEREF(__pyx_v_old);
        __Pyx_INCREF(__pyx_v_new);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_new);
        __Pyx_GIVEREF(__pyx_v_new);
        __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_v_current_format);
        __pyx_v_current_format = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":3102
 *             # 2005-01-03 occurs before the first Monday of the year.  Otherwise
 *             # %U is used.
 *             time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0))             # <<<<<<<<<<<<<<
 *             if '00' in time.strftime(directive, time_tuple):
 *                 U_W = '%W'
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__struct_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_195), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_time_tuple);
    __pyx_v_time_tuple = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":3103
 *             # %U is used.
 *             time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0))
 *             if '00' in time.strftime(directive, time_tuple):             # <<<<<<<<<<<<<<
 *                 U_W = '%W'
 *             else:
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__strftime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_directive);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_directive);
    __Pyx_GIVEREF(__pyx_v_directive);
    __Pyx_INCREF(__pyx_v_time_tuple);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_time_tuple);
    __Pyx_GIVEREF(__pyx_v_time_tuple);
    __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_12 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s__00), __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_12) {

      /* "pandas/tslib.pyx":3104
 *             time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0))
 *             if '00' in time.strftime(directive, time_tuple):
 *                 U_W = '%W'             # <<<<<<<<<<<<<<
 *             else:
 *                 U_W = '%U'
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_196));
      __Pyx_XDECREF(__pyx_v_U_W);
      __pyx_v_U_W = ((PyObject *)__pyx_kp_s_196);
      goto __pyx_L16;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":3106
 *                 U_W = '%W'
 *             else:
 *                 U_W = '%U'             # <<<<<<<<<<<<<<
 *             date_time[offset] = current_format.replace('11', U_W)
 *         self.LC_date_time = date_time[0]
 */
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_197));
      __Pyx_XDECREF(__pyx_v_U_W);
      __pyx_v_U_W = ((PyObject *)__pyx_kp_s_197);
    }
    __pyx_L16:;

    /* "pandas/tslib.pyx":3107
 *             else:
 *                 U_W = '%U'
 *             date_time[offset] = current_format.replace('11', U_W)             # <<<<<<<<<<<<<<
 *         self.LC_date_time = date_time[0]
 *         self.LC_date = date_time[1]
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_current_format, __pyx_n_s__replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s__11));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s__11));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__11));
    __Pyx_INCREF(__pyx_v_U_W);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_U_W);
    __Pyx_GIVEREF(__pyx_v_U_W);
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (PyObject_SetItem(((PyObject *)__pyx_v_date_time), __pyx_v_offset, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3108
 *                 U_W = '%U'
 *             date_time[offset] = current_format.replace('11', U_W)
 *         self.LC_date_time = date_time[0]             # <<<<<<<<<<<<<<
 *         self.LC_date = date_time[1]
 *         self.LC_time = date_time[2]
 */
  __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_date_time), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__LC_date_time, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3109
 *             date_time[offset] = current_format.replace('11', U_W)
 *         self.LC_date_time = date_time[0]
 *         self.LC_date = date_time[1]             # <<<<<<<<<<<<<<
 *         self.LC_time = date_time[2]
 * 
 */
  __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_date_time), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__LC_date, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3110
 *         self.LC_date_time = date_time[0]
 *         self.LC_date = date_time[1]
 *         self.LC_time = date_time[2]             # <<<<<<<<<<<<<<
 * 
 *     def __calc_timezone(self):
 */
  __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_date_time), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__LC_time, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_date_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_time_tuple);
  __Pyx_XDECREF(__pyx_v_date_time);
  __Pyx_XDECREF(__pyx_v_replacement_pairs);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_directive);
  __Pyx_XDECREF(__pyx_v_current_format);
  __Pyx_XDECREF(__pyx_v_old);
  __Pyx_XDECREF(__pyx_v_new);
  __Pyx_XDECREF(__pyx_v_U_W);
  __Pyx_XDECREF(__pyx_v_tz_values);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_10LocaleTime_13__calc_timezone = {__Pyx_NAMESTR("__calc_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_10LocaleTime_13__calc_timezone(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__calc_timezone (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3112
 *         self.LC_time = date_time[2]
 * 
 *     def __calc_timezone(self):             # <<<<<<<<<<<<<<
 *         # Set self.timezone by using time.tzname.
 *         # Do not worry about possibility of time.tzname[0] == timetzname[1]
 */

static PyObject *__pyx_pf_6pandas_5tslib_10LocaleTime_12__calc_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_no_saving = NULL;
  PyObject *__pyx_v_has_saving = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__calc_timezone", 0);

  /* "pandas/tslib.pyx":3116
 *         # Do not worry about possibility of time.tzname[0] == timetzname[1]
 *         # and time.daylight; handle that in strptime .
 *         try:             # <<<<<<<<<<<<<<
 *             time.tzset()
 *         except AttributeError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "pandas/tslib.pyx":3117
 *         # and time.daylight; handle that in strptime .
 *         try:
 *             time.tzset()             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             pass
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__tzset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pandas/tslib.pyx":3118
 *         try:
 *             time.tzset()
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             pass
 *         no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()])
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      PyErr_Restore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/tslib.pyx":3120
 *         except AttributeError:
 *             pass
 *         no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()])             # <<<<<<<<<<<<<<
 *         if time.daylight:
 *             has_saving = frozenset([time.tzname[1].lower()])
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__tzname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utc));
  PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__utc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__gmt));
  PyList_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__gmt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gmt));
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_no_saving = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3121
 *             pass
 *         no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()])
 *         if time.daylight:             # <<<<<<<<<<<<<<
 *             has_saving = frozenset([time.tzname[1].lower()])
 *         else:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__daylight); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_7) {

    /* "pandas/tslib.pyx":3122
 *         no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()])
 *         if time.daylight:
 *             has_saving = frozenset([time.tzname[1].lower()])             # <<<<<<<<<<<<<<
 *         else:
 *             has_saving = frozenset()
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__tzname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_has_saving = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3124
 *             has_saving = frozenset([time.tzname[1].lower()])
 *         else:
 *             has_saving = frozenset()             # <<<<<<<<<<<<<<
 *         self.timezone = (no_saving, has_saving)
 * 
 */
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_has_saving = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L11:;

  /* "pandas/tslib.pyx":3125
 *         else:
 *             has_saving = frozenset()
 *         self.timezone = (no_saving, has_saving)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_no_saving));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_no_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_no_saving));
  __Pyx_INCREF(((PyObject *)__pyx_v_has_saving));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_has_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_has_saving));
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__timezone, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas.tslib.LocaleTime.__calc_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_no_saving);
  __Pyx_XDECREF(__pyx_v_has_saving);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_6TimeRE___init__[] = "Create keys/values.\n\n        Order of execution is important for dependency reasons.\n\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE___init__)};
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_locale_time = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__locale_time,0};
    PyObject* values[2] = {0,0};

    /* "pandas/tslib.pyx":3131
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__locale_time);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __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_self = values[0];
    __pyx_v_locale_time = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE___init__(__pyx_self, __pyx_v_self, __pyx_v_locale_time);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pandas/tslib.pyx":3164
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone             # <<<<<<<<<<<<<<
 *                                         for tz in tz_names),
 *                                 'Z'),
 */

static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr->tp_new(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__timezone); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tz_names);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_tz_names);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_v_tz_names = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":3165
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone
 *                                         for tz in tz_names),             # <<<<<<<<<<<<<<
 *                                 'Z'),
 *             '%': '%'})
 */
    if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_tz_names) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_tz_names)) {
      __pyx_t_2 = __pyx_cur_scope->__pyx_v_tz_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_tz_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_2);
        if (unlikely(!__pyx_t_7)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_tz);
      __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_tz);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_cur_scope->__pyx_v_tz = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":3164
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone             # <<<<<<<<<<<<<<
 *                                         for tz in tz_names),
 *                                 'Z'),
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tz);
      __pyx_r = __pyx_cur_scope->__pyx_v_tz;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __Pyx_XGIVEREF(__pyx_t_2);
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
      __pyx_cur_scope->__pyx_t_3 = __pyx_t_4;
      __pyx_cur_scope->__pyx_t_4 = __pyx_t_5;
      __pyx_cur_scope->__pyx_t_5 = __pyx_t_6;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L8_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = 0;
      __Pyx_XGOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
      __pyx_t_4 = __pyx_cur_scope->__pyx_t_3;
      __pyx_t_5 = __pyx_cur_scope->__pyx_t_4;
      __pyx_t_6 = __pyx_cur_scope->__pyx_t_5;
      if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "pandas/tslib.pyx":3131
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_locale_time) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *__pyx_cur_scope;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__->tp_new(__pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "pandas/tslib.pyx":3137
 * 
 *         """
 *         if locale_time:             # <<<<<<<<<<<<<<
 *             self.locale_time = locale_time
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_locale_time); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":3138
 *         """
 *         if locale_time:
 *             self.locale_time = locale_time             # <<<<<<<<<<<<<<
 *         else:
 *             self.locale_time = LocaleTime()
 */
    if (PyObject_SetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time, __pyx_v_locale_time) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3140
 *             self.locale_time = locale_time
 *         else:
 *             self.locale_time = LocaleTime()             # <<<<<<<<<<<<<<
 *         base = super(TimeRE, self)
 *         base.__init__({
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__LocaleTime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyObject_SetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3141
 *         else:
 *             self.locale_time = LocaleTime()
 *         base = super(TimeRE, self)             # <<<<<<<<<<<<<<
 *         base.__init__({
 *             # The " \d" part of the regex is to make %c from ANSI C work
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__TimeRE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_base = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3142
 *             self.locale_time = LocaleTime()
 *         base = super(TimeRE, self)
 *         base.__init__({             # <<<<<<<<<<<<<<
 *             # The " \d" part of the regex is to make %c from ANSI C work
 *             'd': r"(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])",
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_base, __pyx_n_s____init__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__d), ((PyObject *)__pyx_kp_s_198)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_kp_s_199)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__H), ((PyObject *)__pyx_kp_s_200)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__I), ((PyObject *)__pyx_kp_s_201)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_kp_s_202)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_kp_s_203)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__M), ((PyObject *)__pyx_kp_s_204)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__S), ((PyObject *)__pyx_kp_s_205)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__U), ((PyObject *)__pyx_kp_s_206)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__w), ((PyObject *)__pyx_kp_s_207)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__y), ((PyObject *)__pyx_kp_s_208)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Y), ((PyObject *)__pyx_kp_s_209)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3159
 *             #     4 digits?
 *             'Y': r"(?P<Y>\d\d\d\d)",
 *             'A': self.__seqToRE(self.locale_time.f_weekday, 'A'),             # <<<<<<<<<<<<<<
 *             'a': self.__seqToRE(self.locale_time.a_weekday, 'a'),
 *             'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'),
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__f_weekday); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__A));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__A));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__A));
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__A), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3160
 *             'Y': r"(?P<Y>\d\d\d\d)",
 *             'A': self.__seqToRE(self.locale_time.f_weekday, 'A'),
 *             'a': self.__seqToRE(self.locale_time.a_weekday, 'a'),             # <<<<<<<<<<<<<<
 *             'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'),
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 */
  __pyx_t_6 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__a_weekday); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __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_INCREF(((PyObject *)__pyx_n_s__a));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__a));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__a), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":3161
 *             'A': self.__seqToRE(self.locale_time.f_weekday, 'A'),
 *             'a': self.__seqToRE(self.locale_time.a_weekday, 'a'),
 *             'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'),             # <<<<<<<<<<<<<<
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__f_month); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_t_6, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__B));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__B));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__B));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__B), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3162
 *             'a': self.__seqToRE(self.locale_time.a_weekday, 'a'),
 *             'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'),
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),             # <<<<<<<<<<<<<<
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__a_month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_t_4, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __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_INCREF(((PyObject *)__pyx_n_s__b));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__b));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b));
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__b), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3163
 *             'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'),
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),             # <<<<<<<<<<<<<<
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone
 *                                         for tz in tz_names),
 */
  __pyx_t_6 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__am_pm); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __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_INCREF(((PyObject *)__pyx_n_s__p));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__p), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3164
 *             'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'),
 *             'p': self.__seqToRE(self.locale_time.am_pm, 'p'),
 *             'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone             # <<<<<<<<<<<<<<
 *                                         for tz in tz_names),
 *                                 'Z'),
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___TimeRE__seqToRE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_pf_6pandas_5tslib_6TimeRE_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __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_INCREF(((PyObject *)__pyx_n_s__Z));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__Z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Z));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Z), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_s_84), ((PyObject *)__pyx_kp_s_84)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3168
 *                                 'Z'),
 *             '%': '%'})
 *         base.__setitem__('W', base.__getitem__('U').replace('U', 'W'))             # <<<<<<<<<<<<<<
 *         base.__setitem__('c', self.pattern(self.locale_time.LC_date_time))
 *         base.__setitem__('x', self.pattern(self.locale_time.LC_date))
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_base, __pyx_n_s____getitem__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_210), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_211), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__W));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__W));
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3169
 *             '%': '%'})
 *         base.__setitem__('W', base.__getitem__('U').replace('U', 'W'))
 *         base.__setitem__('c', self.pattern(self.locale_time.LC_date_time))             # <<<<<<<<<<<<<<
 *         base.__setitem__('x', self.pattern(self.locale_time.LC_date))
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__LC_date_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__c));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__c));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3170
 *         base.__setitem__('W', base.__getitem__('U').replace('U', 'W'))
 *         base.__setitem__('c', self.pattern(self.locale_time.LC_date_time))
 *         base.__setitem__('x', self.pattern(self.locale_time.LC_date))             # <<<<<<<<<<<<<<
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))
 * 
 */
  __pyx_t_6 = PyObject_GetAttr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__LC_date); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":3171
 *         base.__setitem__('c', self.pattern(self.locale_time.LC_date_time))
 *         base.__setitem__('x', self.pattern(self.locale_time.LC_date))
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))             # <<<<<<<<<<<<<<
 * 
 *     def __seqToRE(self, to_convert, directive):
 */
  __pyx_t_4 = PyObject_GetAttr(__pyx_v_base, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__locale_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__LC_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__X));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__X));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__X));
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib.TimeRE.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_6TimeRE_2__seqToRE[] = "Convert a list to a regex string for matching a directive.\n\n        Want possible matching values to be from longest to shortest.  This\n        prevents the possibility of a match occuring for a value that also\n        a substring of a larger value that should have matched (e.g., 'abc'\n        matching when 'abcdef' should have been the match).\n\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE = {__Pyx_NAMESTR("__seqToRE"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_2__seqToRE)};
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_3__seqToRE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to_convert = 0;
  PyObject *__pyx_v_directive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__seqToRE (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__to_convert,&__pyx_n_s__directive,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__to_convert)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__directive)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__seqToRE") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __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_self = values[0];
    __pyx_v_to_convert = values[1];
    __pyx_v_directive = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__seqToRE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(__pyx_self, __pyx_v_self, __pyx_v_to_convert, __pyx_v_directive);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pandas/tslib.pyx":3188
 *         else:
 *             return ''
 *         regex = '|'.join(re_escape(stuff) for stuff in to_convert)             # <<<<<<<<<<<<<<
 *         regex = '(?P<%s>%s' % (directive, regex)
 *         return '%s)' % regex
 */

static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr->tp_new(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_6pandas_5tslib_6TimeRE_9__seqToRE_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert)) { __Pyx_RaiseClosureNameError("to_convert"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_convert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __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[0]; __pyx_lineno = 3188; __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[0]; __pyx_lineno = 3188; __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[0]; __pyx_lineno = 3188; __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[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_stuff);
    __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_stuff);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_stuff = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__re_escape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stuff);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_stuff);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stuff);
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "pandas/tslib.pyx":3173
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))
 * 
 *     def __seqToRE(self, to_convert, directive):             # <<<<<<<<<<<<<<
 *         """Convert a list to a regex string for matching a directive.
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_2__seqToRE(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_to_convert, PyObject *__pyx_v_directive) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *__pyx_cur_scope;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_regex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__seqToRE", 0);
  __pyx_cur_scope = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE->tp_new(__pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_to_convert = __pyx_v_to_convert;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_convert);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_convert);

  /* "pandas/tslib.pyx":3182
 * 
 *         """
 *         to_convert = sorted(to_convert, key=len, reverse=True)             # <<<<<<<<<<<<<<
 *         for value in to_convert:
 *             if value != '':
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_convert);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_to_convert);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_convert);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_3 = __Pyx_GetName(__pyx_b, __pyx_n_s__len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__key), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reverse), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_to_convert);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_to_convert);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_to_convert = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3183
 *         """
 *         to_convert = sorted(to_convert, key=len, reverse=True)
 *         for value in to_convert:             # <<<<<<<<<<<<<<
 *             if value != '':
 *                 break
 */
  if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_to_convert) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_to_convert)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_to_convert; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_to_convert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_value);
    __pyx_v_value = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":3184
 *         to_convert = sorted(to_convert, key=len, reverse=True)
 *         for value in to_convert:
 *             if value != '':             # <<<<<<<<<<<<<<
 *                 break
 *         else:
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_s_25), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":3185
 *         for value in to_convert:
 *             if value != '':
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3187
 *                 break
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 *         regex = '|'.join(re_escape(stuff) for stuff in to_convert)
 *         regex = '(?P<%s>%s' % (directive, regex)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
    __pyx_r = ((PyObject *)__pyx_kp_s_25);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3188
 *         else:
 *             return ''
 *         regex = '|'.join(re_escape(stuff) for stuff in to_convert)             # <<<<<<<<<<<<<<
 *         regex = '(?P<%s>%s' % (directive, regex)
 *         return '%s)' % regex
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_212), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_pf_6pandas_5tslib_6TimeRE_9__seqToRE_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_regex = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3189
 *             return ''
 *         regex = '|'.join(re_escape(stuff) for stuff in to_convert)
 *         regex = '(?P<%s>%s' % (directive, regex)             # <<<<<<<<<<<<<<
 *         return '%s)' % regex
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_directive);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_directive);
  __Pyx_GIVEREF(__pyx_v_directive);
  __Pyx_INCREF(__pyx_v_regex);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_regex);
  __Pyx_GIVEREF(__pyx_v_regex);
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_213), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_regex);
  __pyx_v_regex = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3190
 *         regex = '|'.join(re_escape(stuff) for stuff in to_convert)
 *         regex = '(?P<%s>%s' % (directive, regex)
 *         return '%s)' % regex             # <<<<<<<<<<<<<<
 * 
 *     def pattern(self, format):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_214), __pyx_v_regex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.tslib.TimeRE.__seqToRE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_regex);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_5pattern(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_6TimeRE_4pattern[] = "Return regex pattern for the format string.\n\n        Need to make sure that any characters that might be interpreted as\n        regex syntax are escaped.\n\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_5pattern = {__Pyx_NAMESTR("pattern"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_5pattern, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_4pattern)};
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_5pattern(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pattern (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pattern", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pattern") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __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_self = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pattern", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.TimeRE.pattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_4pattern(__pyx_self, __pyx_v_self, __pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3192
 *         return '%s)' % regex
 * 
 *     def pattern(self, format):             # <<<<<<<<<<<<<<
 *         """Return regex pattern for the format string.
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_4pattern(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_v_processed_format = NULL;
  PyObject *__pyx_v_regex_chars = NULL;
  PyObject *__pyx_v_whitespace_replacement = NULL;
  PyObject *__pyx_v_directive_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pattern", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "pandas/tslib.pyx":3199
 * 
 *         """
 *         processed_format = ''             # <<<<<<<<<<<<<<
 *         # The sub() call escapes all characters that might be misconstrued
 *         # as regex syntax.  Cannot use re.escape since we have to deal with
 */
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
  __pyx_v_processed_format = ((PyObject *)__pyx_kp_s_25);

  /* "pandas/tslib.pyx":3203
 *         # as regex syntax.  Cannot use re.escape since we have to deal with
 *         # format directives (%m, etc.).
 *         regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")             # <<<<<<<<<<<<<<
 *         format = regex_chars.sub(r"\\\1", format)
 *         whitespace_replacement = re_compile('\s+')
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_216), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_regex_chars = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3204
 *         # format directives (%m, etc.).
 *         regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")
 *         format = regex_chars.sub(r"\\\1", format)             # <<<<<<<<<<<<<<
 *         whitespace_replacement = re_compile('\s+')
 *         format = whitespace_replacement.sub('\s+', format)
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_regex_chars, __pyx_n_s__sub); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_217));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_217));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_217));
  __Pyx_INCREF(__pyx_v_format);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_format);
  __Pyx_GIVEREF(__pyx_v_format);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_v_format);
  __pyx_v_format = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3205
 *         regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")
 *         format = regex_chars.sub(r"\\\1", format)
 *         whitespace_replacement = re_compile('\s+')             # <<<<<<<<<<<<<<
 *         format = whitespace_replacement.sub('\s+', format)
 *         while '%' in format:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__re_compile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_219), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_whitespace_replacement = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3206
 *         format = regex_chars.sub(r"\\\1", format)
 *         whitespace_replacement = re_compile('\s+')
 *         format = whitespace_replacement.sub('\s+', format)             # <<<<<<<<<<<<<<
 *         while '%' in format:
 *             directive_index = format.index('%')+1
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_whitespace_replacement, __pyx_n_s__sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_218));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_218));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_218));
  __Pyx_INCREF(__pyx_v_format);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_format);
  __Pyx_GIVEREF(__pyx_v_format);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_v_format);
  __pyx_v_format = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3207
 *         whitespace_replacement = re_compile('\s+')
 *         format = whitespace_replacement.sub('\s+', format)
 *         while '%' in format:             # <<<<<<<<<<<<<<
 *             directive_index = format.index('%')+1
 *             processed_format = "%s%s%s" % (processed_format,
 */
  while (1) {
    __pyx_t_4 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_84), __pyx_v_format, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_4) break;

    /* "pandas/tslib.pyx":3208
 *         format = whitespace_replacement.sub('\s+', format)
 *         while '%' in format:
 *             directive_index = format.index('%')+1             # <<<<<<<<<<<<<<
 *             processed_format = "%s%s%s" % (processed_format,
 *                                            format[:directive_index-1],
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_220), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_directive_index);
    __pyx_v_directive_index = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":3210
 *             directive_index = format.index('%')+1
 *             processed_format = "%s%s%s" % (processed_format,
 *                                            format[:directive_index-1],             # <<<<<<<<<<<<<<
 *                                            self[format[directive_index]])
 *             format = format[directive_index+1:]
 */
    __pyx_t_2 = PyNumber_Subtract(__pyx_v_directive_index, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_format, 0, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);

    /* "pandas/tslib.pyx":3211
 *             processed_format = "%s%s%s" % (processed_format,
 *                                            format[:directive_index-1],
 *                                            self[format[directive_index]])             # <<<<<<<<<<<<<<
 *             format = format[directive_index+1:]
 *         return "%s%s" % (processed_format, format)
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_format, __pyx_v_directive_index); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetItem(__pyx_v_self, __pyx_t_3); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_processed_format);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_processed_format);
    __Pyx_GIVEREF(__pyx_v_processed_format);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_221), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_processed_format);
    __pyx_v_processed_format = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":3212
 *                                            format[:directive_index-1],
 *                                            self[format[directive_index]])
 *             format = format[directive_index+1:]             # <<<<<<<<<<<<<<
 *         return "%s%s" % (processed_format, format)
 * 
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_directive_index, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_format, __pyx_t_5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_format);
    __pyx_v_format = __pyx_t_1;
    __pyx_t_1 = 0;
  }

  /* "pandas/tslib.pyx":3213
 *                                            self[format[directive_index]])
 *             format = format[directive_index+1:]
 *         return "%s%s" % (processed_format, format)             # <<<<<<<<<<<<<<
 * 
 *     def compile(self, format):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_processed_format);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_processed_format);
  __Pyx_GIVEREF(__pyx_v_processed_format);
  __Pyx_INCREF(__pyx_v_format);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_format);
  __Pyx_GIVEREF(__pyx_v_format);
  __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_222), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.tslib.TimeRE.pattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_processed_format);
  __Pyx_XDECREF(__pyx_v_regex_chars);
  __Pyx_XDECREF(__pyx_v_whitespace_replacement);
  __Pyx_XDECREF(__pyx_v_directive_index);
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_7compile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_6TimeRE_6compile[] = "Return a compiled re object for the format string.";
static PyMethodDef __pyx_mdef_6pandas_5tslib_6TimeRE_7compile = {__Pyx_NAMESTR("compile"), (PyCFunction)__pyx_pw_6pandas_5tslib_6TimeRE_7compile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_6TimeRE_6compile)};
static PyObject *__pyx_pw_6pandas_5tslib_6TimeRE_7compile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("compile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,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__self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("compile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __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_self = values[0];
    __pyx_v_format = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("compile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.TimeRE.compile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_6TimeRE_6compile(__pyx_self, __pyx_v_self, __pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3215
 *         return "%s%s" % (processed_format, format)
 * 
 *     def compile(self, format):             # <<<<<<<<<<<<<<
 *         """Return a compiled re object for the format string."""
 *         return re_compile(self.pattern(format), IGNORECASE)
 */

static PyObject *__pyx_pf_6pandas_5tslib_6TimeRE_6compile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("compile", 0);

  /* "pandas/tslib.pyx":3217
 *     def compile(self, format):
 *         """Return a compiled re object for the format string."""
 *         return re_compile(self.pattern(format), IGNORECASE)             # <<<<<<<<<<<<<<
 * 
 * _cache_lock = _thread_allocate_lock()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pattern); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_format);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_format);
  __Pyx_GIVEREF(__pyx_v_format);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__IGNORECASE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_98_calc_julian_from_U_or_W[] = "Calculate the Julian day based on the year, week of the year, and day of\n    the week, with week_start_day representing whether the week of the year\n    assumes the week starts on Sunday or Monday (6 or 0).";
static PyMethodDef __pyx_mdef_6pandas_5tslib_99_calc_julian_from_U_or_W = {__Pyx_NAMESTR("_calc_julian_from_U_or_W"), (PyCFunction)__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_98_calc_julian_from_U_or_W)};
static PyObject *__pyx_pw_6pandas_5tslib_99_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_year = 0;
  PyObject *__pyx_v_week_of_year = 0;
  PyObject *__pyx_v_day_of_week = 0;
  PyObject *__pyx_v_week_starts_Mon = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_calc_julian_from_U_or_W (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__year,&__pyx_n_s__week_of_year,&__pyx_n_s__day_of_week,&__pyx_n_s__week_starts_Mon,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__year)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__week_of_year)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__day_of_week)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__week_starts_Mon)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_calc_julian_from_U_or_W") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __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_year = values[0];
    __pyx_v_week_of_year = values[1];
    __pyx_v_day_of_week = values[2];
    __pyx_v_week_starts_Mon = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_calc_julian_from_U_or_W", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib._calc_julian_from_U_or_W", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(__pyx_self, __pyx_v_year, __pyx_v_week_of_year, __pyx_v_day_of_week, __pyx_v_week_starts_Mon);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3226
 * _regex_cache = {}
 * 
 * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon):             # <<<<<<<<<<<<<<
 *     """Calculate the Julian day based on the year, week of the year, and day of
 *     the week, with week_start_day representing whether the week of the year
 */

static PyObject *__pyx_pf_6pandas_5tslib_98_calc_julian_from_U_or_W(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_year, PyObject *__pyx_v_week_of_year, PyObject *__pyx_v_day_of_week, PyObject *__pyx_v_week_starts_Mon) {
  PyObject *__pyx_v_first_weekday = NULL;
  PyObject *__pyx_v_week_0_length = NULL;
  PyObject *__pyx_v_days_to_week = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_calc_julian_from_U_or_W", 0);
  __Pyx_INCREF(__pyx_v_day_of_week);

  /* "pandas/tslib.pyx":3230
 *     the week, with week_start_day representing whether the week of the year
 *     assumes the week starts on Sunday or Monday (6 or 0)."""
 *     first_weekday = datetime_date(year, 1, 1).weekday()             # <<<<<<<<<<<<<<
 *     # If we are dealing with the %U directive (week starts on Sunday), it's
 *     # easier to just shift the view to Sunday being the first day of the
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_year);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_year);
  __Pyx_GIVEREF(__pyx_v_year);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__weekday); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_first_weekday = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3234
 *     # easier to just shift the view to Sunday being the first day of the
 *     # week.
 *     if not week_starts_Mon:             # <<<<<<<<<<<<<<
 *         first_weekday = (first_weekday + 1) % 7
 *         day_of_week = (day_of_week + 1) % 7
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_week_starts_Mon); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":3235
 *     # week.
 *     if not week_starts_Mon:
 *         first_weekday = (first_weekday + 1) % 7             # <<<<<<<<<<<<<<
 *         day_of_week = (day_of_week + 1) % 7
 *     # Need to watch out for a week 0 (when the first day of the year is not
 */
    __pyx_t_3 = PyNumber_Add(__pyx_v_first_weekday, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_int_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_first_weekday);
    __pyx_v_first_weekday = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":3236
 *     if not week_starts_Mon:
 *         first_weekday = (first_weekday + 1) % 7
 *         day_of_week = (day_of_week + 1) % 7             # <<<<<<<<<<<<<<
 *     # Need to watch out for a week 0 (when the first day of the year is not
 *     # the same as that specified by %U or %W).
 */
    __pyx_t_2 = PyNumber_Add(__pyx_v_day_of_week, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(__pyx_t_2, __pyx_int_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_day_of_week);
    __pyx_v_day_of_week = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3239
 *     # Need to watch out for a week 0 (when the first day of the year is not
 *     # the same as that specified by %U or %W).
 *     week_0_length = (7 - first_weekday) % 7             # <<<<<<<<<<<<<<
 *     if week_of_year == 0:
 *         return 1 + day_of_week - first_weekday
 */
  __pyx_t_3 = PyNumber_Subtract(__pyx_int_7, __pyx_v_first_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_int_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_week_0_length = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3240
 *     # the same as that specified by %U or %W).
 *     week_0_length = (7 - first_weekday) % 7
 *     if week_of_year == 0:             # <<<<<<<<<<<<<<
 *         return 1 + day_of_week - first_weekday
 *     else:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_week_of_year, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":3241
 *     week_0_length = (7 - first_weekday) % 7
 *     if week_of_year == 0:
 *         return 1 + day_of_week - first_weekday             # <<<<<<<<<<<<<<
 *     else:
 *         days_to_week = week_0_length + (7 * (week_of_year - 1))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyNumber_Add(__pyx_int_1, __pyx_v_day_of_week); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_first_weekday); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3243
 *         return 1 + day_of_week - first_weekday
 *     else:
 *         days_to_week = week_0_length + (7 * (week_of_year - 1))             # <<<<<<<<<<<<<<
 *         return 1 + days_to_week + day_of_week
 * 
 */
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_week_of_year, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Multiply(__pyx_int_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_v_week_0_length, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_days_to_week = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pandas/tslib.pyx":3244
 *     else:
 *         days_to_week = week_0_length + (7 * (week_of_year - 1))
 *         return 1 + days_to_week + day_of_week             # <<<<<<<<<<<<<<
 * 
 * # def _strptime_time(data_string, format="%a %b %d %H:%M:%S %Y"):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyNumber_Add(__pyx_int_1, __pyx_v_days_to_week); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_day_of_week); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas.tslib._calc_julian_from_U_or_W", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_first_weekday);
  __Pyx_XDECREF(__pyx_v_week_0_length);
  __Pyx_XDECREF(__pyx_v_days_to_week);
  __Pyx_XDECREF(__pyx_v_day_of_week);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":126
 * 
 * 
 * cdef inline _string_to_dts(object val, pandas_datetimestruct* dts):             # <<<<<<<<<<<<<<
 *     cdef int result
 *     cdef char *tmp
 */

static CYTHON_INLINE PyObject *__pyx_f_8datetime__string_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  int __pyx_v_result;
  char *__pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_string_to_dts", 0);
  __Pyx_INCREF(__pyx_v_val);

  /* "datetime.pxd":130
 *     cdef char *tmp
 * 
 *     if PyUnicode_Check(val):             # <<<<<<<<<<<<<<
 *         val = PyUnicode_AsASCIIString(val);
 * 
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_val);
  if (__pyx_t_1) {

    /* "datetime.pxd":131
 * 
 *     if PyUnicode_Check(val):
 *         val = PyUnicode_AsASCIIString(val);             # <<<<<<<<<<<<<<
 * 
 *     tmp = val
 */
    __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "datetime.pxd":133
 *         val = PyUnicode_AsASCIIString(val);
 * 
 *     tmp = val             # <<<<<<<<<<<<<<
 *     result = _cstring_to_dts(tmp, len(val), dts)
 * 
 */
  __pyx_t_3 = PyBytes_AsString(__pyx_v_val); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_tmp = __pyx_t_3;

  /* "datetime.pxd":134
 * 
 *     tmp = val
 *     result = _cstring_to_dts(tmp, len(val), dts)             # <<<<<<<<<<<<<<
 * 
 *     if result == -1:
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_result = __pyx_f_8datetime__cstring_to_dts(__pyx_v_tmp, __pyx_t_4, __pyx_v_dts);

  /* "datetime.pxd":136
 *     result = _cstring_to_dts(tmp, len(val), dts)
 * 
 *     if result == -1:             # <<<<<<<<<<<<<<
 *         raise ValueError('Unable to parse %s' % str(val))
 * 
 */
  __pyx_t_1 = (__pyx_v_result == -1);
  if (__pyx_t_1) {

    /* "datetime.pxd":137
 * 
 *     if result == -1:
 *         raise ValueError('Unable to parse %s' % str(val))             # <<<<<<<<<<<<<<
 * 
 * cdef inline int _cstring_to_dts(char *val, int length,
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_223), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("datetime._string_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":139
 *         raise ValueError('Unable to parse %s' % str(val))
 * 
 * cdef inline int _cstring_to_dts(char *val, int length,             # <<<<<<<<<<<<<<
 *                                 pandas_datetimestruct* dts):
 *     cdef:
 */

static CYTHON_INLINE int __pyx_f_8datetime__cstring_to_dts(char *__pyx_v_val, int __pyx_v_length, pandas_datetimestruct *__pyx_v_dts) {
  npy_bool __pyx_v_islocal;
  npy_bool __pyx_v_special;
  PANDAS_DATETIMEUNIT __pyx_v_out_bestunit;
  int __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cstring_to_dts", 0);

  /* "datetime.pxd":148
 *     result = parse_iso_8601_datetime(val, length, PANDAS_FR_ns,
 *                                      NPY_UNSAFE_CASTING,
 *                                      dts, &islocal, &out_bestunit, &special)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result = parse_iso_8601_datetime(__pyx_v_val, __pyx_v_length, PANDAS_FR_ns, NPY_UNSAFE_CASTING, __pyx_v_dts, (&__pyx_v_islocal), (&__pyx_v_out_bestunit), (&__pyx_v_special));

  /* "datetime.pxd":149
 *                                      NPY_UNSAFE_CASTING,
 *                                      dts, &islocal, &out_bestunit, &special)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

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

/* "datetime.pxd":152
 * 
 * 
 * cdef inline object _datetime64_to_datetime(int64_t val):             # <<<<<<<<<<<<<<
 *     cdef pandas_datetimestruct dts
 *     pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 */

static CYTHON_INLINE PyObject *__pyx_f_8datetime__datetime64_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_val) {
  pandas_datetimestruct __pyx_v_dts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_datetime64_to_datetime", 0);

  /* "datetime.pxd":154
 * cdef inline object _datetime64_to_datetime(int64_t val):
 *     cdef pandas_datetimestruct dts
 *     pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *     return _dts_to_pydatetime(&dts)
 * 
 */
  pandas_datetime_to_datetimestruct(__pyx_v_val, PANDAS_FR_ns, (&__pyx_v_dts));

  /* "datetime.pxd":155
 *     cdef pandas_datetimestruct dts
 *     pandas_datetime_to_datetimestruct(val, PANDAS_FR_ns, &dts)
 *     return _dts_to_pydatetime(&dts)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8datetime__dts_to_pydatetime((&__pyx_v_dts)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "datetime.pxd":157
 *     return _dts_to_pydatetime(&dts)
 * 
 * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     return <object> PyDateTime_FromDateAndTime(dts.year, dts.month,
 *                                                dts.day, dts.hour,
 */

static CYTHON_INLINE PyObject *__pyx_f_8datetime__dts_to_pydatetime(pandas_datetimestruct *__pyx_v_dts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dts_to_pydatetime", 0);

  /* "datetime.pxd":158
 * 
 * cdef inline object _dts_to_pydatetime(pandas_datetimestruct *dts):
 *     return <object> PyDateTime_FromDateAndTime(dts.year, dts.month,             # <<<<<<<<<<<<<<
 *                                                dts.day, dts.hour,
 *                                                dts.min, dts.sec, dts.us)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "datetime.pxd":160
 *     return <object> PyDateTime_FromDateAndTime(dts.year, dts.month,
 *                                                dts.day, dts.hour,
 *                                                dts.min, dts.sec, dts.us)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):
 */
  __pyx_t_1 = PyDateTime_FromDateAndTime(__pyx_v_dts->year, __pyx_v_dts->month, __pyx_v_dts->day, __pyx_v_dts->hour, __pyx_v_dts->min, __pyx_v_dts->sec, __pyx_v_dts->us); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "datetime.pxd":162
 *                                                dts.min, dts.sec, dts.us)
 * 
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):             # <<<<<<<<<<<<<<
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__pydatetime_to_dts(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pydatetime_to_dts", 0);

  /* "datetime.pxd":163
 * 
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)             # <<<<<<<<<<<<<<
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":164
 * cdef inline int64_t _pydatetime_to_dts(object val, pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)             # <<<<<<<<<<<<<<
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":165
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)             # <<<<<<<<<<<<<<
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":166
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)             # <<<<<<<<<<<<<<
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 */
  __pyx_v_dts->hour = PyDateTime_DATE_GET_HOUR(__pyx_v_val);

  /* "datetime.pxd":167
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)             # <<<<<<<<<<<<<<
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 */
  __pyx_v_dts->min = PyDateTime_DATE_GET_MINUTE(__pyx_v_val);

  /* "datetime.pxd":168
 *     dts.hour = PyDateTime_DATE_GET_HOUR(val)
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)             # <<<<<<<<<<<<<<
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 *     dts.ps = dts.as = 0
 */
  __pyx_v_dts->sec = PyDateTime_DATE_GET_SECOND(__pyx_v_val);

  /* "datetime.pxd":169
 *     dts.min = PyDateTime_DATE_GET_MINUTE(val)
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)             # <<<<<<<<<<<<<<
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_v_dts->us = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_val);

  /* "datetime.pxd":170
 *     dts.sec = PyDateTime_DATE_GET_SECOND(val)
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 *     dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;
  __pyx_v_dts->as = 0;

  /* "datetime.pxd":171
 *     dts.us = PyDateTime_DATE_GET_MICROSECOND(val)
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _dtlike_to_datetime64(object val,
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("datetime._pydatetime_to_dts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":173
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 * cdef inline int64_t _dtlike_to_datetime64(object val,             # <<<<<<<<<<<<<<
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__dtlike_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  npy_int64 __pyx_t_2;
  npy_int32 __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dtlike_to_datetime64", 0);

  /* "datetime.pxd":175
 * cdef inline int64_t _dtlike_to_datetime64(object val,
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year             # <<<<<<<<<<<<<<
 *     dts.month = val.month
 *     dts.day = val.day
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->year = __pyx_t_2;

  /* "datetime.pxd":176
 *                                           pandas_datetimestruct *dts):
 *     dts.year = val.year
 *     dts.month = val.month             # <<<<<<<<<<<<<<
 *     dts.day = val.day
 *     dts.hour = val.hour
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->month = __pyx_t_3;

  /* "datetime.pxd":177
 *     dts.year = val.year
 *     dts.month = val.month
 *     dts.day = val.day             # <<<<<<<<<<<<<<
 *     dts.hour = val.hour
 *     dts.min = val.minute
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->day = __pyx_t_3;

  /* "datetime.pxd":178
 *     dts.month = val.month
 *     dts.day = val.day
 *     dts.hour = val.hour             # <<<<<<<<<<<<<<
 *     dts.min = val.minute
 *     dts.sec = val.second
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->hour = __pyx_t_3;

  /* "datetime.pxd":179
 *     dts.day = val.day
 *     dts.hour = val.hour
 *     dts.min = val.minute             # <<<<<<<<<<<<<<
 *     dts.sec = val.second
 *     dts.us = val.microsecond
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->min = __pyx_t_3;

  /* "datetime.pxd":180
 *     dts.hour = val.hour
 *     dts.min = val.minute
 *     dts.sec = val.second             # <<<<<<<<<<<<<<
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->sec = __pyx_t_3;

  /* "datetime.pxd":181
 *     dts.min = val.minute
 *     dts.sec = val.second
 *     dts.us = val.microsecond             # <<<<<<<<<<<<<<
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_3 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dts->us = __pyx_t_3;

  /* "datetime.pxd":182
 *     dts.sec = val.second
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;
  __pyx_v_dts->as = 0;

  /* "datetime.pxd":183
 *     dts.us = val.microsecond
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t _date_to_datetime64(object val,
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("datetime._dtlike_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":185
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 * cdef inline int64_t _date_to_datetime64(object val,             # <<<<<<<<<<<<<<
 *                                         pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_8datetime__date_to_datetime64(PyObject *__pyx_v_val, pandas_datetimestruct *__pyx_v_dts) {
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_date_to_datetime64", 0);

  /* "datetime.pxd":187
 * cdef inline int64_t _date_to_datetime64(object val,
 *                                         pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)             # <<<<<<<<<<<<<<
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->year = PyDateTime_GET_YEAR(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":188
 *                                         pandas_datetimestruct *dts):
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)             # <<<<<<<<<<<<<<
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->month = PyDateTime_GET_MONTH(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":189
 *     dts.year = PyDateTime_GET_YEAR(val)
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)             # <<<<<<<<<<<<<<
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 *     dts.ps = dts.as = 0
 */
  if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_8datetime_date))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_val;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_dts->day = PyDateTime_GET_DAY(((PyDateTime_Date *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "datetime.pxd":190
 *     dts.month = PyDateTime_GET_MONTH(val)
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = dts.min = dts.sec = dts.us = 0             # <<<<<<<<<<<<<<
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 */
  __pyx_v_dts->hour = 0;
  __pyx_v_dts->min = 0;
  __pyx_v_dts->sec = 0;
  __pyx_v_dts->us = 0;

  /* "datetime.pxd":191
 *     dts.day = PyDateTime_GET_DAY(val)
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 *     dts.ps = dts.as = 0             # <<<<<<<<<<<<<<
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)
 * 
 */
  __pyx_v_dts->ps = 0;
  __pyx_v_dts->as = 0;

  /* "datetime.pxd":192
 *     dts.hour = dts.min = dts.sec = dts.us = 0
 *     dts.ps = dts.as = 0
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, dts)             # <<<<<<<<<<<<<<
 * 
 */
  __pyx_r = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, __pyx_v_dts);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("datetime._date_to_datetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":196
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }

  /* "numpy.pxd":202
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __pyx_t_1 = (__pyx_v_info == NULL);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":205
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":206
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":208
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "numpy.pxd":210
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":211
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "numpy.pxd":213
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "numpy.pxd":215
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
  if (__pyx_t_1) {

    /* "numpy.pxd":216
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
    __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS));
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "numpy.pxd":217
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_225), 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_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "numpy.pxd":219
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
  if (__pyx_t_3) {

    /* "numpy.pxd":220
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
    __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS));
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "numpy.pxd":221
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_227), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "numpy.pxd":223
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "numpy.pxd":224
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "numpy.pxd":225
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  if (__pyx_v_copy_shape) {

    /* "numpy.pxd":228
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "numpy.pxd":229
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "numpy.pxd":230
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_5 = __pyx_v_ndim;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "numpy.pxd":231
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "numpy.pxd":232
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "numpy.pxd":234
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "numpy.pxd":235
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L7:;

  /* "numpy.pxd":236
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "numpy.pxd":237
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "numpy.pxd":238
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self));

  /* "numpy.pxd":241
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef list stack
 */
  __pyx_v_f = NULL;

  /* "numpy.pxd":242
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef list stack
 *             cdef int offset
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->descr);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "numpy.pxd":246
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "numpy.pxd":248
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_2 = (!__pyx_v_hasfields);
  if (__pyx_t_2) {
    __pyx_t_3 = (!__pyx_v_copy_shape);
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "numpy.pxd":250
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "numpy.pxd":253
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L10:;

  /* "numpy.pxd":255
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 */
  __pyx_t_1 = (!__pyx_v_hasfields);
  if (__pyx_t_1) {

    /* "numpy.pxd":256
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 */
    __pyx_t_5 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_5;

    /* "numpy.pxd":257
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_little_endian;
    } else {
      __pyx_t_2 = __pyx_t_1;
    }
    if (!__pyx_t_2) {

      /* "numpy.pxd":258
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
      if (__pyx_t_1) {
        __pyx_t_3 = (!__pyx_v_little_endian);
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_1;
      }
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    if (__pyx_t_1) {

      /* "numpy.pxd":259
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_229), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "numpy.pxd":260
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__b;
      goto __pyx_L13;
    }

    /* "numpy.pxd":261
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__B;
      goto __pyx_L13;
    }

    /* "numpy.pxd":262
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__h;
      goto __pyx_L13;
    }

    /* "numpy.pxd":263
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__H;
      goto __pyx_L13;
    }

    /* "numpy.pxd":264
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_INT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__i;
      goto __pyx_L13;
    }

    /* "numpy.pxd":265
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__I;
      goto __pyx_L13;
    }

    /* "numpy.pxd":266
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__l;
      goto __pyx_L13;
    }

    /* "numpy.pxd":267
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__L;
      goto __pyx_L13;
    }

    /* "numpy.pxd":268
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":269
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":270
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__f;
      goto __pyx_L13;
    }

    /* "numpy.pxd":271
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__d;
      goto __pyx_L13;
    }

    /* "numpy.pxd":272
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__g;
      goto __pyx_L13;
    }

    /* "numpy.pxd":273
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zf;
      goto __pyx_L13;
    }

    /* "numpy.pxd":274
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zd;
      goto __pyx_L13;
    }

    /* "numpy.pxd":275
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zg;
      goto __pyx_L13;
    }

    /* "numpy.pxd":276
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__O;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "numpy.pxd":278
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_230), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L13:;

    /* "numpy.pxd":279
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "numpy.pxd":280
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "numpy.pxd":282
 *                 return
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = '^' # Native data types, manual alignment
 *                 offset = 0
 */
    __pyx_v_info->format = ((char *)malloc(255));

    /* "numpy.pxd":283
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = '^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "numpy.pxd":284
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = '^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "numpy.pxd":287
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)             # <<<<<<<<<<<<<<
 *                 f[0] = 0 # Terminate format string
 * 
 */
    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_9;

    /* "numpy.pxd":288
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = 0;
  }
  __pyx_L11:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":290
 *                 f[0] = 0 # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "numpy.pxd":291
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self);
  if (__pyx_t_1) {

    /* "numpy.pxd":292
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)
 */
    free(__pyx_v_info->format);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":293
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":294
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    free(__pyx_v_info->strides);
    goto __pyx_L4;
  }
  __pyx_L4:;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":772
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "numpy.pxd":773
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":775
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "numpy.pxd":776
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":778
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "numpy.pxd":779
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":781
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "numpy.pxd":782
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":784
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "numpy.pxd":785
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "numpy.pxd":787
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);

  /* "numpy.pxd":794
 *     cdef int delta_offset
 *     cdef tuple i
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":795
 *     cdef tuple i
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":798
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_childname);
    __pyx_v_childname = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "numpy.pxd":799
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_fields));
    __pyx_v_fields = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "numpy.pxd":800
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 */
    if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) {
      PyObject* sequence = ((PyObject *)__pyx_v_fields);
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_new_offset);
    __pyx_v_new_offset = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "numpy.pxd":802
 *         child, new_offset = fields
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {

      /* "numpy.pxd":803
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_232), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "numpy.pxd":805
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_7 = (__pyx_v_child->byteorder == '>');
    if (__pyx_t_7) {
      __pyx_t_8 = __pyx_v_little_endian;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    if (!__pyx_t_8) {

      /* "numpy.pxd":806
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
      __pyx_t_7 = (__pyx_v_child->byteorder == '<');
      if (__pyx_t_7) {
        __pyx_t_9 = (!__pyx_v_little_endian);
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_7;
      }
      __pyx_t_7 = __pyx_t_10;
    } else {
      __pyx_t_7 = __pyx_t_8;
    }
    if (__pyx_t_7) {

      /* "numpy.pxd":807
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_233), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "numpy.pxd":817
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_7) break;

      /* "numpy.pxd":818
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 120;

      /* "numpy.pxd":819
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "numpy.pxd":820
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_11 = 0;
      (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1);
    }

    /* "numpy.pxd":822
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_11 = 0;
    (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize);

    /* "numpy.pxd":824
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child));
    if (__pyx_t_7) {

      /* "numpy.pxd":825
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "numpy.pxd":826
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5);
      if (__pyx_t_7) {

        /* "numpy.pxd":827
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_235), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "numpy.pxd":830
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L13;
      }

      /* "numpy.pxd":831
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L13;
      }

      /* "numpy.pxd":832
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 104;
        goto __pyx_L13;
      }

      /* "numpy.pxd":833
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L13;
      }

      /* "numpy.pxd":834
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 105;
        goto __pyx_L13;
      }

      /* "numpy.pxd":835
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L13;
      }

      /* "numpy.pxd":836
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 108;
        goto __pyx_L13;
      }

      /* "numpy.pxd":837
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L13;
      }

      /* "numpy.pxd":838
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 113;
        goto __pyx_L13;
      }

      /* "numpy.pxd":839
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L13;
      }

      /* "numpy.pxd":840
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 102;
        goto __pyx_L13;
      }

      /* "numpy.pxd":841
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 100;
        goto __pyx_L13;
      }

      /* "numpy.pxd":842
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 103;
        goto __pyx_L13;
      }

      /* "numpy.pxd":843
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 102;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":844
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 100;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":845
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 103;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":846
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "numpy.pxd":848
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_230), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L13:;

      /* "numpy.pxd":849
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);
      goto __pyx_L11;
    }
    /*else*/ {

      /* "numpy.pxd":853
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
      __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_12;
    }
    __pyx_L11:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":854
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":969
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "numpy.pxd":971
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __pyx_t_1 = (__pyx_v_base == Py_None);
  if (__pyx_t_1) {

    /* "numpy.pxd":972
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __pyx_v_baseptr = NULL;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":974
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
    Py_INCREF(__pyx_v_base);

    /* "numpy.pxd":975
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "numpy.pxd":976
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  Py_XDECREF(__pyx_v_arr->base);

  /* "numpy.pxd":977
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __pyx_v_arr->base = __pyx_v_baseptr;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":979
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "numpy.pxd":980
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __pyx_t_1 = (__pyx_v_arr->base == NULL);
  if (__pyx_t_1) {

    /* "numpy.pxd":981
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":983
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }
  __pyx_L3:;

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

/* "util.pxd":26
 *     object sarr_from_data(cnp.dtype, int length, void* data)
 * 
 * cdef inline object get_value_at(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_at", 0);
  __Pyx_INCREF(__pyx_v_loc);

  /* "util.pxd":30
 *         Py_ssize_t i, sz
 *         void* data_ptr
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "util.pxd":31
 *         void* data_ptr
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "util.pxd":32
 *     if is_float_object(loc):
 *         casted = int(loc)
 *         if casted == loc:             # <<<<<<<<<<<<<<
 *             loc = casted
 *     i = <Py_ssize_t> loc
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "util.pxd":33
 *         casted = int(loc)
 *         if casted == loc:
 *             loc = casted             # <<<<<<<<<<<<<<
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)
 */
      __Pyx_INCREF(__pyx_v_casted);
      __Pyx_DECREF(__pyx_v_loc);
      __pyx_v_loc = __pyx_v_casted;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "util.pxd":34
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_5);

  /* "util.pxd":35
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0 and sz > 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "util.pxd":37
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0 and sz > 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz or sz == 0:
 */
  __pyx_t_4 = (__pyx_v_i < 0);
  if (__pyx_t_4) {
    __pyx_t_6 = (__pyx_v_sz > 0);
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_4;
  }
  if (__pyx_t_7) {

    /* "util.pxd":38
 * 
 *     if i < 0 and sz > 0:
 *         i += sz             # <<<<<<<<<<<<<<
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')
 */
    __pyx_v_i = (__pyx_v_i + __pyx_v_sz);
    goto __pyx_L5;
  }

  /* "util.pxd":39
 *     if i < 0 and sz > 0:
 *         i += sz
 *     elif i >= sz or sz == 0:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_7 = (__pyx_v_i >= __pyx_v_sz);
  if (!__pyx_t_7) {
    __pyx_t_4 = (__pyx_v_sz == 0);
    __pyx_t_6 = __pyx_t_4;
  } else {
    __pyx_t_6 = __pyx_t_7;
  }
  if (__pyx_t_6) {

    /* "util.pxd":40
 *         i += sz
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_236), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "util.pxd":42
 *         raise IndexError('index out of bounds')
 * 
 *     return get_value_1d(arr, i)             # <<<<<<<<<<<<<<
 * 
 * cdef inline set_value_at(ndarray arr, object loc, object value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":44
 *     return get_value_1d(arr, i)
 * 
 * cdef inline set_value_at(ndarray arr, object loc, object value):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_value_at", 0);
  __Pyx_INCREF(__pyx_v_loc);

  /* "util.pxd":47
 *     cdef:
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "util.pxd":48
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "util.pxd":49
 *     if is_float_object(loc):
 *         casted = int(loc)
 *         if casted == loc:             # <<<<<<<<<<<<<<
 *             loc = casted
 *     i = <Py_ssize_t> loc
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "util.pxd":50
 *         casted = int(loc)
 *         if casted == loc:
 *             loc = casted             # <<<<<<<<<<<<<<
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)
 */
      __Pyx_INCREF(__pyx_v_casted);
      __Pyx_DECREF(__pyx_v_loc);
      __pyx_v_loc = __pyx_v_casted;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "util.pxd":51
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_5);

  /* "util.pxd":52
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "util.pxd":54
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz:
 */
  __pyx_t_4 = (__pyx_v_i < 0);
  if (__pyx_t_4) {

    /* "util.pxd":55
 * 
 *     if i < 0:
 *         i += sz             # <<<<<<<<<<<<<<
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')
 */
    __pyx_v_i = (__pyx_v_i + __pyx_v_sz);
    goto __pyx_L5;
  }

  /* "util.pxd":56
 *     if i < 0:
 *         i += sz
 *     elif i >= sz:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_4 = (__pyx_v_i >= __pyx_v_sz);
  if (__pyx_t_4) {

    /* "util.pxd":57
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_237), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "util.pxd":59
 *         raise IndexError('index out of bounds')
 * 
 *     assign_value_1d(arr, i, value)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int is_contiguous(ndarray arr):
 */
  __pyx_t_1 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":61
 *     assign_value_1d(arr, i, value)
 * 
 * cdef inline int is_contiguous(ndarray arr):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 */

static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_contiguous", 0);

  /* "util.pxd":62
 * 
 * cdef inline int is_contiguous(ndarray arr):
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 * 
 * cdef inline is_array(object o):
 */
  __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS);
  goto __pyx_L0;

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

/* "util.pxd":64
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 * cdef inline is_array(object o):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_Check(o)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array", 0);

  /* "util.pxd":65
 * 
 * cdef inline is_array(object o):
 *     return cnp.PyArray_Check(o)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "util.pxd":68
 * 
 * 
 * cdef inline bint _checknull(object val):             # <<<<<<<<<<<<<<
 *     try:
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 */

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

  /* "util.pxd":69
 * 
 * cdef inline bint _checknull(object val):
 *     try:             # <<<<<<<<<<<<<<
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 *     except ValueError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "util.pxd":70
 * cdef inline bint _checknull(object val):
 *     try:
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return False
 */
      __pyx_t_4 = (__pyx_v_val == Py_None);
      __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      if (!__pyx_t_4) {
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyBool_FromLong(PyFloat_Check(__pyx_v_val)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        if (__pyx_t_4) {
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_7 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_8 = __pyx_t_7;
          __pyx_t_7 = 0;
        } else {
          __pyx_t_8 = __pyx_t_6;
          __pyx_t_6 = 0;
        }
        __pyx_t_6 = __pyx_t_8;
        __pyx_t_8 = 0;
      } else {
        __pyx_t_6 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "util.pxd":71
 *     try:
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);

      /* "util.pxd":72
 *         return val is None or (cpython.PyFloat_Check(val) and val != val)
 *     except ValueError:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _checknull_old(object val):
 */
      __pyx_r = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("util._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":74
 *         return False
 * 
 * cdef inline bint _checknull_old(object val):             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     cdef double INF = <double> np.inf
 */

static CYTHON_INLINE int __pyx_f_4util__checknull_old(PyObject *__pyx_v_val) {
  PyObject *__pyx_v_np = NULL;
  double __pyx_v_INF;
  double __pyx_v_NEGINF;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  double __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_checknull_old", 0);

  /* "util.pxd":75
 * 
 * cdef inline bint _checknull_old(object val):
 *     import numpy as np             # <<<<<<<<<<<<<<
 *     cdef double INF = <double> np.inf
 *     cdef double NEGINF = -INF
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "util.pxd":76
 * cdef inline bint _checknull_old(object val):
 *     import numpy as np
 *     cdef double INF = <double> np.inf             # <<<<<<<<<<<<<<
 *     cdef double NEGINF = -INF
 *     try:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_np, __pyx_n_s__inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_INF = ((double)__pyx_t_2);

  /* "util.pxd":77
 *     import numpy as np
 *     cdef double INF = <double> np.inf
 *     cdef double NEGINF = -INF             # <<<<<<<<<<<<<<
 *     try:
 *         return bool(val is None or val != val and val != INF
 */
  __pyx_v_NEGINF = (-__pyx_v_INF);

  /* "util.pxd":78
 *     cdef double INF = <double> np.inf
 *     cdef double NEGINF = -INF
 *     try:             # <<<<<<<<<<<<<<
 *         return bool(val is None or val != val and val != INF
 *                     and val != NEGINF)
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "util.pxd":79
 *     cdef double NEGINF = -INF
 *     try:
 *         return bool(val is None or val != val and val != INF             # <<<<<<<<<<<<<<
 *                     and val != NEGINF)
 *     except ValueError:
 */
      __pyx_t_6 = (__pyx_v_val == Py_None);
      if (!__pyx_t_6) {
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_7) {

          /* "util.pxd":80
 *     try:
 *         return bool(val is None or val != val and val != INF
 *                     and val != NEGINF)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         return False
 */
          __pyx_t_1 = PyFloat_FromDouble(__pyx_v_INF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_8 = PyObject_RichCompare(__pyx_v_val, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_9) {
            __pyx_t_8 = PyFloat_FromDouble(__pyx_v_NEGINF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_1 = PyObject_RichCompare(__pyx_v_val, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_11 = __pyx_t_10;
          } else {
            __pyx_t_11 = __pyx_t_9;
          }
          __pyx_t_9 = __pyx_t_11;
        } else {
          __pyx_t_9 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_9;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_r = (!(!__pyx_t_7));
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "util.pxd":81
 *         return bool(val is None or val != val and val != INF
 *                     and val != NEGINF)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_13);

      /* "util.pxd":82
 *                     and val != NEGINF)
 *     except ValueError:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _checknan(object val):
 */
      __pyx_r = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L10_try_end:;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_WriteUnraisable("util._checknull_old", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":84
 *         return False
 * 
 * cdef inline bint _checknan(object val):             # <<<<<<<<<<<<<<
 *     return not cnp.PyArray_Check(val) and val != val
 */

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

  /* "util.pxd":85
 * 
 * cdef inline bint _checknan(object val):
 *     return not cnp.PyArray_Check(val) and val != val             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((!PyArray_Check(__pyx_v_val))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("util._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6pandas_5tslib__Timestamp __pyx_vtable_6pandas_5tslib__Timestamp;

static PyObject *__pyx_tp_new_6pandas_5tslib__Timestamp(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5tslib__Timestamp *p;
  PyObject *o = __pyx_ptype_8datetime_datetime->tp_new(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib__Timestamp *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_5tslib__Timestamp;
  p->offset = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5tslib__Timestamp(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o;
  Py_CLEAR(p->offset);
  if (likely(__pyx_ptype_8datetime_datetime)) __pyx_ptype_8datetime_datetime->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6pandas_5tslib__Timestamp);
}

static int __pyx_tp_traverse_6pandas_5tslib__Timestamp(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o;
  e = ((likely(__pyx_ptype_8datetime_datetime)) ? ((__pyx_ptype_8datetime_datetime->tp_traverse) ? __pyx_ptype_8datetime_datetime->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_5tslib__Timestamp)); if (e) return e;
  if (p->offset) {
    e = (*v)(p->offset, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5tslib__Timestamp(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib__Timestamp *p = (struct __pyx_obj_6pandas_5tslib__Timestamp *)o;
  PyObject* tmp;
  if (likely(__pyx_ptype_8datetime_datetime)) { if (__pyx_ptype_8datetime_datetime->tp_clear) __pyx_ptype_8datetime_datetime->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_5tslib__Timestamp);
  tmp = ((PyObject*)p->offset);
  p->offset = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5tslib_10_Timestamp_5value_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_nanosecond(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5tslib_10_Timestamp_10nanosecond_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_5tslib_10_Timestamp_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5tslib_10_Timestamp_6offset_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5tslib__Timestamp[] = {
  {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_5to_datetime, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_11_get_field, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5tslib__Timestamp[] = {
  {(char *)"value", __pyx_getprop_6pandas_5tslib_10_Timestamp_value, 0, 0, 0},
  {(char *)"nanosecond", __pyx_getprop_6pandas_5tslib_10_Timestamp_nanosecond, 0, 0, 0},
  {(char *)"offset", __pyx_getprop_6pandas_5tslib_10_Timestamp_offset, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__Timestamp = {
  __pyx_pw_6pandas_5tslib_10_Timestamp_7__add__, /*nb_add*/
  __pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence__Timestamp = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__Timestamp = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__Timestamp = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib__Timestamp = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib._Timestamp"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib__Timestamp), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib__Timestamp, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number__Timestamp, /*tp_as_number*/
  &__pyx_tp_as_sequence__Timestamp, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__Timestamp, /*tp_as_mapping*/
  __pyx_pw_6pandas_5tslib_10_Timestamp_1__hash__, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__Timestamp, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib__Timestamp, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib__Timestamp, /*tp_clear*/
  __pyx_pw_6pandas_5tslib_10_Timestamp_3__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib__Timestamp, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5tslib__Timestamp, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib__Timestamp, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_5tslib__NaT __pyx_vtable_6pandas_5tslib__NaT;

static PyObject *__pyx_tp_new_6pandas_5tslib__NaT(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_5tslib__NaT *p;
  PyObject *o = __pyx_tp_new_6pandas_5tslib__Timestamp(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib__NaT *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5tslib__Timestamp*)__pyx_vtabptr_6pandas_5tslib__NaT;
  return o;
}

static PyMethodDef __pyx_methods_6pandas_5tslib__NaT[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__NaT = {
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5tslib_10_Timestamp_7__add__, /*nb_add*/
  #else
  0, /*nb_add*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6pandas_5tslib_10_Timestamp_9__sub__, /*nb_subtract*/
  #else
  0, /*nb_subtract*/
  #endif
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence__NaT = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__NaT = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__NaT = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib__NaT = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib._NaT"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib__NaT), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib__Timestamp, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number__NaT, /*tp_as_number*/
  &__pyx_tp_as_sequence__NaT, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__NaT, /*tp_as_mapping*/
  __pyx_pw_6pandas_5tslib_4_NaT_1__hash__, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__NaT, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib__Timestamp, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib__Timestamp, /*tp_clear*/
  __pyx_pw_6pandas_5tslib_4_NaT_3__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib__NaT, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib__NaT, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5tslib__TSObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_5tslib__TSObject *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib__TSObject *)o);
  p->tzinfo = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_5tslib__TSObject(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o;
  Py_CLEAR(p->tzinfo);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_5tslib__TSObject(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o;
  if (p->tzinfo) {
    e = (*v)(p->tzinfo, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5tslib__TSObject(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib__TSObject *p = (struct __pyx_obj_6pandas_5tslib__TSObject *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->tzinfo);
  p->tzinfo = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_5tslib_9_TSObject_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6pandas_5tslib_9_TSObject_5value_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_5tslib__TSObject[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_5tslib__TSObject[] = {
  {(char *)"value", __pyx_getprop_6pandas_5tslib_9_TSObject_value, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number__TSObject = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence__TSObject = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__TSObject = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer__TSObject = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib__TSObject = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib._TSObject"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib__TSObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib__TSObject, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number__TSObject, /*tp_as_number*/
  &__pyx_tp_as_sequence__TSObject, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__TSObject, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer__TSObject, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib__TSObject, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib__TSObject, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib__TSObject, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_5tslib__TSObject, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib__TSObject, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o);
  p->__pyx_v_self = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o;
  Py_CLEAR(p->__pyx_v_self);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct____init__(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct____init__[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct____init__ = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct____init__ = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct____init__ = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct____init__ = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct____init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct____init__"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct____init__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct____init__, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct____init__, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct____init__, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct____init__, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct____init__, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct____init__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib___pyx_scope_struct____init__, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib___pyx_scope_struct____init__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_tz = 0;
  p->__pyx_v_tz_names = 0;
  p->__pyx_t_0 = 0;
  p->__pyx_t_1 = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o;
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_tz);
  Py_CLEAR(p->__pyx_v_tz_names);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_1);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_tz) {
    e = (*v)(p->__pyx_v_tz, a); if (e) return e;
  }
  if (p->__pyx_v_tz_names) {
    e = (*v)(p->__pyx_v_tz_names, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_1) {
    e = (*v)(p->__pyx_t_1, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct____init__ *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_tz);
  p->__pyx_v_tz = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_tz_names);
  p->__pyx_v_tz_names = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_1);
  p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct_1_genexpr[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_1_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o);
  p->__pyx_v_to_convert = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o;
  Py_CLEAR(p->__pyx_v_to_convert);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o;
  if (p->__pyx_v_to_convert) {
    e = (*v)(p->__pyx_v_to_convert, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_2___seqToRE(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_to_convert);
  p->__pyx_v_to_convert = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct_2___seqToRE[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_2___seqToRE = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_2___seqToRE = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_2___seqToRE = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_2___seqToRE = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_2___seqToRE"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct_2___seqToRE, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_2___seqToRE, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_2___seqToRE, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_2___seqToRE, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_2___seqToRE, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o);
  p->__pyx_outer_scope = 0;
  p->__pyx_v_stuff = 0;
  p->__pyx_t_0 = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o;
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_stuff);
  Py_CLEAR(p->__pyx_t_0);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_stuff) {
    e = (*v)(p->__pyx_v_stuff, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_2___seqToRE *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stuff);
  p->__pyx_v_stuff = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_5tslib___pyx_scope_struct_3_genexpr[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_3_genexpr = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_3_genexpr = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_3_genexpr = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_3_genexpr = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas.tslib.__pyx_scope_struct_3_genexpr"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_5tslib___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct_3_genexpr, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct_3_genexpr, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct_3_genexpr, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct_3_genexpr, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_traverse*/
  __pyx_tp_clear_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_5tslib___pyx_scope_struct_3_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("get_value_box"), (PyCFunction)__pyx_pw_6pandas_5tslib_9get_value_box, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_utcoffset"), (PyCFunction)__pyx_pw_6pandas_5tslib_17_get_utcoffset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("cast_from_unit"), (PyCFunction)__pyx_pw_6pandas_5tslib_37cast_from_unit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_36cast_from_unit)},
  {__Pyx_NAMESTR("_unbox_utcoffsets"), (PyCFunction)__pyx_pw_6pandas_5tslib_55_unbox_utcoffsets, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("normalize_date"), (PyCFunction)__pyx_pw_6pandas_5tslib_73normalize_date, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_72normalize_date)},
  {__Pyx_NAMESTR("period_asfreq"), (PyCFunction)__pyx_pw_6pandas_5tslib_79period_asfreq, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_78period_asfreq)},
  {__Pyx_NAMESTR("period_ordinal_to_dt64"), (PyCFunction)__pyx_pw_6pandas_5tslib_85period_ordinal_to_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("resolution"), (PyCFunction)__pyx_pw_6pandas_5tslib_95resolution, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("tslib"),
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
  {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
  {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0},
  {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0},
  {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
  {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0},
  {&__pyx_n_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 1},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_kp_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 0},
  {&__pyx_kp_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 0},
  {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0},
  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
  {&__pyx_kp_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 0},
  {&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0},
  {&__pyx_kp_b_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 0, 0},
  {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0},
  {&__pyx_kp_b_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 0, 0},
  {&__pyx_kp_b_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 0, 0},
  {&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0},
  {&__pyx_kp_b_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 0, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_b_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 0, 0},
  {&__pyx_kp_b_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 0, 0},
  {&__pyx_kp_b_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 0, 0},
  {&__pyx_kp_b_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 0, 0},
  {&__pyx_kp_b_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 0, 0},
  {&__pyx_kp_b_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 0, 0},
  {&__pyx_kp_s_136, __pyx_k_136, sizeof(__pyx_k_136), 0, 0, 1, 0},
  {&__pyx_kp_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 0},
  {&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
  {&__pyx_n_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 1},
  {&__pyx_kp_s_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 1, 0},
  {&__pyx_kp_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 0},
  {&__pyx_kp_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 0},
  {&__pyx_kp_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 0},
  {&__pyx_kp_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 0},
  {&__pyx_kp_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 0},
  {&__pyx_kp_s_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 1, 0},
  {&__pyx_n_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 1},
  {&__pyx_n_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 1},
  {&__pyx_n_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 1},
  {&__pyx_n_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 1},
  {&__pyx_n_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 1},
  {&__pyx_kp_s_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 0, 1, 0},
  {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
  {&__pyx_kp_s_161, __pyx_k_161, sizeof(__pyx_k_161), 0, 0, 1, 0},
  {&__pyx_kp_s_162, __pyx_k_162, sizeof(__pyx_k_162), 0, 0, 1, 0},
  {&__pyx_kp_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 0},
  {&__pyx_kp_s_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 1, 0},
  {&__pyx_kp_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 0},
  {&__pyx_kp_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 0},
  {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0},
  {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0},
  {&__pyx_kp_s_171, __pyx_k_171, sizeof(__pyx_k_171), 0, 0, 1, 0},
  {&__pyx_kp_s_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 0, 1, 0},
  {&__pyx_kp_s_175, __pyx_k_175, sizeof(__pyx_k_175), 0, 0, 1, 0},
  {&__pyx_kp_s_177, __pyx_k_177, sizeof(__pyx_k_177), 0, 0, 1, 0},
  {&__pyx_kp_s_179, __pyx_k_179, sizeof(__pyx_k_179), 0, 0, 1, 0},
  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
  {&__pyx_kp_s_182, __pyx_k_182, sizeof(__pyx_k_182), 0, 0, 1, 0},
  {&__pyx_kp_s_185, __pyx_k_185, sizeof(__pyx_k_185), 0, 0, 1, 0},
  {&__pyx_kp_s_187, __pyx_k_187, sizeof(__pyx_k_187), 0, 0, 1, 0},
  {&__pyx_kp_s_189, __pyx_k_189, sizeof(__pyx_k_189), 0, 0, 1, 0},
  {&__pyx_kp_s_196, __pyx_k_196, sizeof(__pyx_k_196), 0, 0, 1, 0},
  {&__pyx_kp_s_197, __pyx_k_197, sizeof(__pyx_k_197), 0, 0, 1, 0},
  {&__pyx_kp_s_198, __pyx_k_198, sizeof(__pyx_k_198), 0, 0, 1, 0},
  {&__pyx_kp_s_199, __pyx_k_199, sizeof(__pyx_k_199), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
  {&__pyx_kp_s_200, __pyx_k_200, sizeof(__pyx_k_200), 0, 0, 1, 0},
  {&__pyx_kp_s_201, __pyx_k_201, sizeof(__pyx_k_201), 0, 0, 1, 0},
  {&__pyx_kp_s_202, __pyx_k_202, sizeof(__pyx_k_202), 0, 0, 1, 0},
  {&__pyx_kp_s_203, __pyx_k_203, sizeof(__pyx_k_203), 0, 0, 1, 0},
  {&__pyx_kp_s_204, __pyx_k_204, sizeof(__pyx_k_204), 0, 0, 1, 0},
  {&__pyx_kp_s_205, __pyx_k_205, sizeof(__pyx_k_205), 0, 0, 1, 0},
  {&__pyx_kp_s_206, __pyx_k_206, sizeof(__pyx_k_206), 0, 0, 1, 0},
  {&__pyx_kp_s_207, __pyx_k_207, sizeof(__pyx_k_207), 0, 0, 1, 0},
  {&__pyx_kp_s_208, __pyx_k_208, sizeof(__pyx_k_208), 0, 0, 1, 0},
  {&__pyx_kp_s_209, __pyx_k_209, sizeof(__pyx_k_209), 0, 0, 1, 0},
  {&__pyx_kp_s_212, __pyx_k_212, sizeof(__pyx_k_212), 0, 0, 1, 0},
  {&__pyx_kp_s_213, __pyx_k_213, sizeof(__pyx_k_213), 0, 0, 1, 0},
  {&__pyx_kp_s_214, __pyx_k_214, sizeof(__pyx_k_214), 0, 0, 1, 0},
  {&__pyx_kp_s_215, __pyx_k_215, sizeof(__pyx_k_215), 0, 0, 1, 0},
  {&__pyx_kp_s_217, __pyx_k_217, sizeof(__pyx_k_217), 0, 0, 1, 0},
  {&__pyx_kp_s_218, __pyx_k_218, sizeof(__pyx_k_218), 0, 0, 1, 0},
  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
  {&__pyx_kp_s_221, __pyx_k_221, sizeof(__pyx_k_221), 0, 0, 1, 0},
  {&__pyx_kp_s_222, __pyx_k_222, sizeof(__pyx_k_222), 0, 0, 1, 0},
  {&__pyx_kp_s_223, __pyx_k_223, sizeof(__pyx_k_223), 0, 0, 1, 0},
  {&__pyx_kp_u_224, __pyx_k_224, sizeof(__pyx_k_224), 0, 1, 0, 0},
  {&__pyx_kp_u_226, __pyx_k_226, sizeof(__pyx_k_226), 0, 1, 0, 0},
  {&__pyx_kp_u_228, __pyx_k_228, sizeof(__pyx_k_228), 0, 1, 0, 0},
  {&__pyx_kp_u_230, __pyx_k_230, sizeof(__pyx_k_230), 0, 1, 0, 0},
  {&__pyx_kp_u_231, __pyx_k_231, sizeof(__pyx_k_231), 0, 1, 0, 0},
  {&__pyx_kp_u_234, __pyx_k_234, sizeof(__pyx_k_234), 0, 1, 0, 0},
  {&__pyx_n_s_238, __pyx_k_238, sizeof(__pyx_k_238), 0, 0, 1, 1},
  {&__pyx_n_s_239, __pyx_k_239, sizeof(__pyx_k_239), 0, 0, 1, 1},
  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
  {&__pyx_kp_s_240, __pyx_k_240, sizeof(__pyx_k_240), 0, 0, 1, 0},
  {&__pyx_n_s_241, __pyx_k_241, sizeof(__pyx_k_241), 0, 0, 1, 1},
  {&__pyx_kp_s_242, __pyx_k_242, sizeof(__pyx_k_242), 0, 0, 1, 0},
  {&__pyx_kp_s_247, __pyx_k_247, sizeof(__pyx_k_247), 0, 0, 1, 0},
  {&__pyx_n_s_248, __pyx_k_248, sizeof(__pyx_k_248), 0, 0, 1, 1},
  {&__pyx_n_s_249, __pyx_k_249, sizeof(__pyx_k_249), 0, 0, 1, 1},
  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
  {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
  {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
  {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
  {&__pyx_kp_s_312, __pyx_k_312, sizeof(__pyx_k_312), 0, 0, 1, 0},
  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
  {&__pyx_kp_s_325, __pyx_k_325, sizeof(__pyx_k_325), 0, 0, 1, 0},
  {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
  {&__pyx_n_s_338, __pyx_k_338, sizeof(__pyx_k_338), 0, 0, 1, 1},
  {&__pyx_n_s_347, __pyx_k_347, sizeof(__pyx_k_347), 0, 0, 1, 1},
  {&__pyx_n_s_350, __pyx_k_350, sizeof(__pyx_k_350), 0, 0, 1, 1},
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
  {&__pyx_n_s_389, __pyx_k_389, sizeof(__pyx_k_389), 0, 0, 1, 1},
  {&__pyx_n_s_392, __pyx_k_392, sizeof(__pyx_k_392), 0, 0, 1, 1},
  {&__pyx_kp_b_399, __pyx_k_399, sizeof(__pyx_k_399), 0, 0, 0, 0},
  {&__pyx_n_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 1},
  {&__pyx_kp_b_400, __pyx_k_400, sizeof(__pyx_k_400), 0, 0, 0, 0},
  {&__pyx_kp_s_400, __pyx_k_400, sizeof(__pyx_k_400), 0, 0, 1, 0},
  {&__pyx_kp_b_402, __pyx_k_402, sizeof(__pyx_k_402), 0, 0, 0, 0},
  {&__pyx_kp_b_403, __pyx_k_403, sizeof(__pyx_k_403), 0, 0, 0, 0},
  {&__pyx_kp_s_403, __pyx_k_403, sizeof(__pyx_k_403), 0, 0, 1, 0},
  {&__pyx_kp_b_405, __pyx_k_405, sizeof(__pyx_k_405), 0, 0, 0, 0},
  {&__pyx_kp_b_406, __pyx_k_406, sizeof(__pyx_k_406), 0, 0, 0, 0},
  {&__pyx_kp_s_406, __pyx_k_406, sizeof(__pyx_k_406), 0, 0, 1, 0},
  {&__pyx_kp_b_408, __pyx_k_408, sizeof(__pyx_k_408), 0, 0, 0, 0},
  {&__pyx_kp_b_409, __pyx_k_409, sizeof(__pyx_k_409), 0, 0, 0, 0},
  {&__pyx_kp_s_409, __pyx_k_409, sizeof(__pyx_k_409), 0, 0, 1, 0},
  {&__pyx_kp_b_411, __pyx_k_411, sizeof(__pyx_k_411), 0, 0, 0, 0},
  {&__pyx_kp_b_412, __pyx_k_412, sizeof(__pyx_k_412), 0, 0, 0, 0},
  {&__pyx_kp_s_412, __pyx_k_412, sizeof(__pyx_k_412), 0, 0, 1, 0},
  {&__pyx_kp_b_414, __pyx_k_414, sizeof(__pyx_k_414), 0, 0, 0, 0},
  {&__pyx_kp_b_415, __pyx_k_415, sizeof(__pyx_k_415), 0, 0, 0, 0},
  {&__pyx_kp_s_415, __pyx_k_415, sizeof(__pyx_k_415), 0, 0, 1, 0},
  {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
  {&__pyx_n_s_421, __pyx_k_421, sizeof(__pyx_k_421), 0, 0, 1, 1},
  {&__pyx_n_s_424, __pyx_k_424, sizeof(__pyx_k_424), 0, 0, 1, 1},
  {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
  {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
  {&__pyx_kp_s_440, __pyx_k_440, sizeof(__pyx_k_440), 0, 0, 1, 0},
  {&__pyx_n_s_446, __pyx_k_446, sizeof(__pyx_k_446), 0, 0, 1, 1},
  {&__pyx_kp_s_451, __pyx_k_451, sizeof(__pyx_k_451), 0, 0, 1, 0},
  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
  {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0},
  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
  {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0},
  {&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1},
  {&__pyx_n_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 1},
  {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
  {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1},
  {&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0},
  {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
  {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
  {&__pyx_n_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 1},
  {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
  {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
  {&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
  {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
  {&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0},
  {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0},
  {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
  {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
  {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0},
  {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0},
  {&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0},
  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
  {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0},
  {&__pyx_n_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 1},
  {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0},
  {&__pyx_kp_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 0},
  {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
  {&__pyx_kp_s__00, __pyx_k__00, sizeof(__pyx_k__00), 0, 0, 1, 0},
  {&__pyx_kp_s__03, __pyx_k__03, sizeof(__pyx_k__03), 0, 0, 1, 0},
  {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
  {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0},
  {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
  {&__pyx_kp_s__1999, __pyx_k__1999, sizeof(__pyx_k__1999), 0, 0, 1, 0},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_s__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 0, 1, 0},
  {&__pyx_kp_s__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 0, 1, 0},
  {&__pyx_kp_s__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 0, 1, 0},
  {&__pyx_kp_s__99, __pyx_k__99, sizeof(__pyx_k__99), 0, 0, 1, 0},
  {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
  {&__pyx_n_s__AmbiguousTimeError, __pyx_k__AmbiguousTimeError, sizeof(__pyx_k__AmbiguousTimeError), 0, 0, 1, 1},
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s__B, __pyx_k__B, sizeof(__pyx_k__B), 0, 0, 1, 1},
  {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1},
  {&__pyx_n_s__D_RESO, __pyx_k__D_RESO, sizeof(__pyx_k__D_RESO), 0, 0, 1, 1},
  {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
  {&__pyx_n_s__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 1, 1},
  {&__pyx_n_s__H_RESO, __pyx_k__H_RESO, sizeof(__pyx_k__H_RESO), 0, 0, 1, 1},
  {&__pyx_n_s__I, __pyx_k__I, sizeof(__pyx_k__I), 0, 0, 1, 1},
  {&__pyx_n_s__IGNORECASE, __pyx_k__IGNORECASE, sizeof(__pyx_k__IGNORECASE), 0, 0, 1, 1},
  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
  {&__pyx_n_s__LC_TIME, __pyx_k__LC_TIME, sizeof(__pyx_k__LC_TIME), 0, 0, 1, 1},
  {&__pyx_n_s__LC_date, __pyx_k__LC_date, sizeof(__pyx_k__LC_date), 0, 0, 1, 1},
  {&__pyx_n_s__LC_date_time, __pyx_k__LC_date_time, sizeof(__pyx_k__LC_date_time), 0, 0, 1, 1},
  {&__pyx_n_s__LC_time, __pyx_k__LC_time, sizeof(__pyx_k__LC_time), 0, 0, 1, 1},
  {&__pyx_n_s__LocaleTime, __pyx_k__LocaleTime, sizeof(__pyx_k__LocaleTime), 0, 0, 1, 1},
  {&__pyx_n_s__LooseVersion, __pyx_k__LooseVersion, sizeof(__pyx_k__LooseVersion), 0, 0, 1, 1},
  {&__pyx_n_s__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 1, 1},
  {&__pyx_n_s__M8, __pyx_k__M8, sizeof(__pyx_k__M8), 0, 0, 1, 1},
  {&__pyx_n_s__NAN, __pyx_k__NAN, sizeof(__pyx_k__NAN), 0, 0, 1, 1},
  {&__pyx_n_s__NAT, __pyx_k__NAT, sizeof(__pyx_k__NAT), 0, 0, 1, 1},
  {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1},
  {&__pyx_n_s__NaT, __pyx_k__NaT, sizeof(__pyx_k__NaT), 0, 0, 1, 1},
  {&__pyx_n_s__NaTType, __pyx_k__NaTType, sizeof(__pyx_k__NaTType), 0, 0, 1, 1},
  {&__pyx_n_s__NameError, __pyx_k__NameError, sizeof(__pyx_k__NameError), 0, 0, 1, 1},
  {&__pyx_n_s__None, __pyx_k__None, sizeof(__pyx_k__None), 0, 0, 1, 1},
  {&__pyx_n_s__OutOfBoundsDatetime, __pyx_k__OutOfBoundsDatetime, sizeof(__pyx_k__OutOfBoundsDatetime), 0, 0, 1, 1},
  {&__pyx_n_s__P, __pyx_k__P, sizeof(__pyx_k__P), 0, 0, 1, 1},
  {&__pyx_n_s__Period, __pyx_k__Period, sizeof(__pyx_k__Period), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1},
  {&__pyx_n_s__S_RESO, __pyx_k__S_RESO, sizeof(__pyx_k__S_RESO), 0, 0, 1, 1},
  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
  {&__pyx_n_s__T_RESO, __pyx_k__T_RESO, sizeof(__pyx_k__T_RESO), 0, 0, 1, 1},
  {&__pyx_n_s__TimeRE, __pyx_k__TimeRE, sizeof(__pyx_k__TimeRE), 0, 0, 1, 1},
  {&__pyx_n_s__Timestamp, __pyx_k__Timestamp, sizeof(__pyx_k__Timestamp), 0, 0, 1, 1},
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
  {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1},
  {&__pyx_n_s__US_RESO, __pyx_k__US_RESO, sizeof(__pyx_k__US_RESO), 0, 0, 1, 1},
  {&__pyx_n_s__UTC, __pyx_k__UTC, sizeof(__pyx_k__UTC), 0, 0, 1, 1},
  {&__pyx_n_s__U_W, __pyx_k__U_W, sizeof(__pyx_k__U_W), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__W, __pyx_k__W, sizeof(__pyx_k__W), 0, 0, 1, 1},
  {&__pyx_n_s__X, __pyx_k__X, sizeof(__pyx_k__X), 0, 0, 1, 1},
  {&__pyx_n_s__Y, __pyx_k__Y, sizeof(__pyx_k__Y), 0, 0, 1, 1},
  {&__pyx_n_s__Z, __pyx_k__Z, sizeof(__pyx_k__Z), 0, 0, 1, 1},
  {&__pyx_n_s___CACHE_MAX_SIZE, __pyx_k___CACHE_MAX_SIZE, sizeof(__pyx_k___CACHE_MAX_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s___LocaleTime__pad, __pyx_k___LocaleTime__pad, sizeof(__pyx_k___LocaleTime__pad), 0, 0, 1, 1},
  {&__pyx_n_s___TimeRE__seqToRE, __pyx_k___TimeRE__seqToRE, sizeof(__pyx_k___TimeRE__seqToRE), 0, 0, 1, 1},
  {&__pyx_n_s___TimeRE_cache, __pyx_k___TimeRE_cache, sizeof(__pyx_k___TimeRE_cache), 0, 0, 1, 1},
  {&__pyx_n_s____add__, __pyx_k____add__, sizeof(__pyx_k____add__), 0, 0, 1, 1},
  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
  {&__pyx_n_s____calc_am_pm, __pyx_k____calc_am_pm, sizeof(__pyx_k____calc_am_pm), 0, 0, 1, 1},
  {&__pyx_n_s____calc_date_time, __pyx_k____calc_date_time, sizeof(__pyx_k____calc_date_time), 0, 0, 1, 1},
  {&__pyx_n_s____calc_month, __pyx_k____calc_month, sizeof(__pyx_k____calc_month), 0, 0, 1, 1},
  {&__pyx_n_s____calc_timezone, __pyx_k____calc_timezone, sizeof(__pyx_k____calc_timezone), 0, 0, 1, 1},
  {&__pyx_n_s____calc_weekday, __pyx_k____calc_weekday, sizeof(__pyx_k____calc_weekday), 0, 0, 1, 1},
  {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1},
  {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1},
  {&__pyx_n_s____getitem__, __pyx_k____getitem__, sizeof(__pyx_k____getitem__), 0, 0, 1, 1},
  {&__pyx_n_s____hash__, __pyx_k____hash__, sizeof(__pyx_k____hash__), 0, 0, 1, 1},
  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1},
  {&__pyx_n_s____new__, __pyx_k____new__, sizeof(__pyx_k____new__), 0, 0, 1, 1},
  {&__pyx_n_s____pad, __pyx_k____pad, sizeof(__pyx_k____pad), 0, 0, 1, 1},
  {&__pyx_n_s____reduce__, __pyx_k____reduce__, sizeof(__pyx_k____reduce__), 0, 0, 1, 1},
  {&__pyx_n_s____repr__, __pyx_k____repr__, sizeof(__pyx_k____repr__), 0, 0, 1, 1},
  {&__pyx_n_s____seqToRE, __pyx_k____seqToRE, sizeof(__pyx_k____seqToRE), 0, 0, 1, 1},
  {&__pyx_n_s____setitem__, __pyx_k____setitem__, sizeof(__pyx_k____setitem__), 0, 0, 1, 1},
  {&__pyx_n_s____setstate__, __pyx_k____setstate__, sizeof(__pyx_k____setstate__), 0, 0, 1, 1},
  {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1},
  {&__pyx_n_s____sub__, __pyx_k____sub__, sizeof(__pyx_k____sub__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s___cache_lock, __pyx_k___cache_lock, sizeof(__pyx_k___cache_lock), 0, 0, 1, 1},
  {&__pyx_n_s___date_repr, __pyx_k___date_repr, sizeof(__pyx_k___date_repr), 0, 0, 1, 1},
  {&__pyx_n_s___du_utc, __pyx_k___du_utc, sizeof(__pyx_k___du_utc), 0, 0, 1, 1},
  {&__pyx_n_s___dummy_thread, __pyx_k___dummy_thread, sizeof(__pyx_k___dummy_thread), 0, 0, 1, 1},
  {&__pyx_n_s___get_deltas, __pyx_k___get_deltas, sizeof(__pyx_k___get_deltas), 0, 0, 1, 1},
  {&__pyx_n_s___get_field, __pyx_k___get_field, sizeof(__pyx_k___get_field), 0, 0, 1, 1},
  {&__pyx_n_s___get_transitions, __pyx_k___get_transitions, sizeof(__pyx_k___get_transitions), 0, 0, 1, 1},
  {&__pyx_n_s___getlang, __pyx_k___getlang, sizeof(__pyx_k___getlang), 0, 0, 1, 1},
  {&__pyx_n_s___has_time_component, __pyx_k___has_time_component, sizeof(__pyx_k___has_time_component), 0, 0, 1, 1},
  {&__pyx_n_s___is_fixed_offset, __pyx_k___is_fixed_offset, sizeof(__pyx_k___is_fixed_offset), 0, 0, 1, 1},
  {&__pyx_n_s___is_tzlocal, __pyx_k___is_tzlocal, sizeof(__pyx_k___is_tzlocal), 0, 0, 1, 1},
  {&__pyx_n_s___month_offset, __pyx_k___month_offset, sizeof(__pyx_k___month_offset), 0, 0, 1, 1},
  {&__pyx_n_s___nat_strings, __pyx_k___nat_strings, sizeof(__pyx_k___nat_strings), 0, 0, 1, 1},
  {&__pyx_n_s___np_version, __pyx_k___np_version, sizeof(__pyx_k___np_version), 0, 0, 1, 1},
  {&__pyx_n_s___parse_code_table, __pyx_k___parse_code_table, sizeof(__pyx_k___parse_code_table), 0, 0, 1, 1},
  {&__pyx_n_s___regex_cache, __pyx_k___regex_cache, sizeof(__pyx_k___regex_cache), 0, 0, 1, 1},
  {&__pyx_n_s___repr_base, __pyx_k___repr_base, sizeof(__pyx_k___repr_base), 0, 0, 1, 1},
  {&__pyx_n_s___thread, __pyx_k___thread, sizeof(__pyx_k___thread), 0, 0, 1, 1},
  {&__pyx_n_s___time_repr, __pyx_k___time_repr, sizeof(__pyx_k___time_repr), 0, 0, 1, 1},
  {&__pyx_n_s___transition_info, __pyx_k___transition_info, sizeof(__pyx_k___transition_info), 0, 0, 1, 1},
  {&__pyx_n_s___ts, __pyx_k___ts, sizeof(__pyx_k___ts), 0, 0, 1, 1},
  {&__pyx_n_s___tzinfos, __pyx_k___tzinfos, sizeof(__pyx_k___tzinfos), 0, 0, 1, 1},
  {&__pyx_n_s___utcoffset, __pyx_k___utcoffset, sizeof(__pyx_k___utcoffset), 0, 0, 1, 1},
  {&__pyx_n_s___zero_time, __pyx_k___zero_time, sizeof(__pyx_k___zero_time), 0, 0, 1, 1},
  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
  {&__pyx_n_s__a_idx, __pyx_k__a_idx, sizeof(__pyx_k__a_idx), 0, 0, 1, 1},
  {&__pyx_n_s__a_month, __pyx_k__a_month, sizeof(__pyx_k__a_month), 0, 0, 1, 1},
  {&__pyx_n_s__a_weekday, __pyx_k__a_weekday, sizeof(__pyx_k__a_weekday), 0, 0, 1, 1},
  {&__pyx_n_s__abs, __pyx_k__abs, sizeof(__pyx_k__abs), 0, 0, 1, 1},
  {&__pyx_n_s__all, __pyx_k__all, sizeof(__pyx_k__all), 0, 0, 1, 1},
  {&__pyx_n_s__allocate_lock, __pyx_k__allocate_lock, sizeof(__pyx_k__allocate_lock), 0, 0, 1, 1},
  {&__pyx_n_s__am_pm, __pyx_k__am_pm, sizeof(__pyx_k__am_pm), 0, 0, 1, 1},
  {&__pyx_n_s__ampm, __pyx_k__ampm, sizeof(__pyx_k__ampm), 0, 0, 1, 1},
  {&__pyx_n_s__apply, __pyx_k__apply, sizeof(__pyx_k__apply), 0, 0, 1, 1},
  {&__pyx_n_s__apply_offset, __pyx_k__apply_offset, sizeof(__pyx_k__apply_offset), 0, 0, 1, 1},
  {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1},
  {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1},
  {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1},
  {&__pyx_n_s__array_split, __pyx_k__array_split, sizeof(__pyx_k__array_split), 0, 0, 1, 1},
  {&__pyx_n_s__array_strptime, __pyx_k__array_strptime, sizeof(__pyx_k__array_strptime), 0, 0, 1, 1},
  {&__pyx_n_s__array_to_datetime, __pyx_k__array_to_datetime, sizeof(__pyx_k__array_to_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__asm8, __pyx_k__asm8, sizeof(__pyx_k__asm8), 0, 0, 1, 1},
  {&__pyx_n_s__astimezone, __pyx_k__astimezone, sizeof(__pyx_k__astimezone), 0, 0, 1, 1},
  {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1},
  {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
  {&__pyx_n_s__b_idx, __pyx_k__b_idx, sizeof(__pyx_k__b_idx), 0, 0, 1, 1},
  {&__pyx_n_s__bad_directive, __pyx_k__bad_directive, sizeof(__pyx_k__bad_directive), 0, 0, 1, 1},
  {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1},
  {&__pyx_n_s__base1, __pyx_k__base1, sizeof(__pyx_k__base1), 0, 0, 1, 1},
  {&__pyx_n_s__base2, __pyx_k__base2, sizeof(__pyx_k__base2), 0, 0, 1, 1},
  {&__pyx_n_s__basestring, __pyx_k__basestring, sizeof(__pyx_k__basestring), 0, 0, 1, 1},
  {&__pyx_n_s__both_eq, __pyx_k__both_eq, sizeof(__pyx_k__both_eq), 0, 0, 1, 1},
  {&__pyx_n_s__both_nat, __pyx_k__both_nat, sizeof(__pyx_k__both_nat), 0, 0, 1, 1},
  {&__pyx_n_s__boxed, __pyx_k__boxed, sizeof(__pyx_k__boxed), 0, 0, 1, 1},
  {&__pyx_n_s__build_field_sarray, __pyx_k__build_field_sarray, sizeof(__pyx_k__build_field_sarray), 0, 0, 1, 1},
  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
  {&__pyx_n_s__calendar, __pyx_k__calendar, sizeof(__pyx_k__calendar), 0, 0, 1, 1},
  {&__pyx_n_s__cast_to_nanoseconds, __pyx_k__cast_to_nanoseconds, sizeof(__pyx_k__cast_to_nanoseconds), 0, 0, 1, 1},
  {&__pyx_n_s__clear, __pyx_k__clear, sizeof(__pyx_k__clear), 0, 0, 1, 1},
  {&__pyx_n_s__cls, __pyx_k__cls, sizeof(__pyx_k__cls), 0, 0, 1, 1},
  {&__pyx_n_s__code, __pyx_k__code, sizeof(__pyx_k__code), 0, 0, 1, 1},
  {&__pyx_n_s__coerce, __pyx_k__coerce, sizeof(__pyx_k__coerce), 0, 0, 1, 1},
  {&__pyx_n_s__combine, __pyx_k__combine, sizeof(__pyx_k__combine), 0, 0, 1, 1},
  {&__pyx_n_s__compat_NaT, __pyx_k__compat_NaT, sizeof(__pyx_k__compat_NaT), 0, 0, 1, 1},
  {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
  {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1},
  {&__pyx_n_s__current_format, __pyx_k__current_format, sizeof(__pyx_k__current_format), 0, 0, 1, 1},
  {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
  {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1},
  {&__pyx_n_s__date_normalize, __pyx_k__date_normalize, sizeof(__pyx_k__date_normalize), 0, 0, 1, 1},
  {&__pyx_n_s__date_string, __pyx_k__date_string, sizeof(__pyx_k__date_string), 0, 0, 1, 1},
  {&__pyx_n_s__date_time, __pyx_k__date_time, sizeof(__pyx_k__date_time), 0, 0, 1, 1},
  {&__pyx_n_s__dates_normalized, __pyx_k__dates_normalized, sizeof(__pyx_k__dates_normalized), 0, 0, 1, 1},
  {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1},
  {&__pyx_n_s__datetime64, __pyx_k__datetime64, sizeof(__pyx_k__datetime64), 0, 0, 1, 1},
  {&__pyx_n_s__datetime_date, __pyx_k__datetime_date, sizeof(__pyx_k__datetime_date), 0, 0, 1, 1},
  {&__pyx_n_s__datetime_result, __pyx_k__datetime_result, sizeof(__pyx_k__datetime_result), 0, 0, 1, 1},
  {&__pyx_n_s__datetime_time, __pyx_k__datetime_time, sizeof(__pyx_k__datetime_time), 0, 0, 1, 1},
  {&__pyx_n_s__day, __pyx_k__day, sizeof(__pyx_k__day), 0, 0, 1, 1},
  {&__pyx_n_s__day_abbr, __pyx_k__day_abbr, sizeof(__pyx_k__day_abbr), 0, 0, 1, 1},
  {&__pyx_n_s__day_name, __pyx_k__day_name, sizeof(__pyx_k__day_name), 0, 0, 1, 1},
  {&__pyx_n_s__day_of_week, __pyx_k__day_of_week, sizeof(__pyx_k__day_of_week), 0, 0, 1, 1},
  {&__pyx_n_s__dayfirst, __pyx_k__dayfirst, sizeof(__pyx_k__dayfirst), 0, 0, 1, 1},
  {&__pyx_n_s__daylight, __pyx_k__daylight, sizeof(__pyx_k__daylight), 0, 0, 1, 1},
  {&__pyx_n_s__dayofweek, __pyx_k__dayofweek, sizeof(__pyx_k__dayofweek), 0, 0, 1, 1},
  {&__pyx_n_s__dayofyear, __pyx_k__dayofyear, sizeof(__pyx_k__dayofyear), 0, 0, 1, 1},
  {&__pyx_n_s__days, __pyx_k__days, sizeof(__pyx_k__days), 0, 0, 1, 1},
  {&__pyx_n_s__days_to_week, __pyx_k__days_to_week, sizeof(__pyx_k__days_to_week), 0, 0, 1, 1},
  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
  {&__pyx_n_s__delta, __pyx_k__delta, sizeof(__pyx_k__delta), 0, 0, 1, 1},
  {&__pyx_n_s__deltas, __pyx_k__deltas, sizeof(__pyx_k__deltas), 0, 0, 1, 1},
  {&__pyx_n_s__diff, __pyx_k__diff, sizeof(__pyx_k__diff), 0, 0, 1, 1},
  {&__pyx_n_s__directive, __pyx_k__directive, sizeof(__pyx_k__directive), 0, 0, 1, 1},
  {&__pyx_n_s__directive_index, __pyx_k__directive_index, sizeof(__pyx_k__directive_index), 0, 0, 1, 1},
  {&__pyx_n_s__dow, __pyx_k__dow, sizeof(__pyx_k__dow), 0, 0, 1, 1},
  {&__pyx_n_s__doy, __pyx_k__doy, sizeof(__pyx_k__doy), 0, 0, 1, 1},
  {&__pyx_n_s__dst_hours, __pyx_k__dst_hours, sizeof(__pyx_k__dst_hours), 0, 0, 1, 1},
  {&__pyx_n_s__dt, __pyx_k__dt, sizeof(__pyx_k__dt), 0, 0, 1, 1},
  {&__pyx_n_s__dtarr, __pyx_k__dtarr, sizeof(__pyx_k__dtarr), 0, 0, 1, 1},
  {&__pyx_n_s__dtindex, __pyx_k__dtindex, sizeof(__pyx_k__dtindex), 0, 0, 1, 1},
  {&__pyx_n_s__dts, __pyx_k__dts, sizeof(__pyx_k__dts), 0, 0, 1, 1},
  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
  {&__pyx_n_s__dummy_thread, __pyx_k__dummy_thread, sizeof(__pyx_k__dummy_thread), 0, 0, 1, 1},
  {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1},
  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
  {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
  {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
  {&__pyx_n_s__err, __pyx_k__err, sizeof(__pyx_k__err), 0, 0, 1, 1},
  {&__pyx_n_s__escape, __pyx_k__escape, sizeof(__pyx_k__escape), 0, 0, 1, 1},
  {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1},
  {&__pyx_n_s__extract_ordinals, __pyx_k__extract_ordinals, sizeof(__pyx_k__extract_ordinals), 0, 0, 1, 1},
  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
  {&__pyx_n_s__f_month, __pyx_k__f_month, sizeof(__pyx_k__f_month), 0, 0, 1, 1},
  {&__pyx_n_s__f_weekday, __pyx_k__f_weekday, sizeof(__pyx_k__f_weekday), 0, 0, 1, 1},
  {&__pyx_n_s__fget, __pyx_k__fget, sizeof(__pyx_k__fget), 0, 0, 1, 1},
  {&__pyx_n_s__field, __pyx_k__field, sizeof(__pyx_k__field), 0, 0, 1, 1},
  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
  {&__pyx_n_s__fill, __pyx_k__fill, sizeof(__pyx_k__fill), 0, 0, 1, 1},
  {&__pyx_n_s__finfo, __pyx_k__finfo, sizeof(__pyx_k__finfo), 0, 0, 1, 1},
  {&__pyx_n_s__first_weekday, __pyx_k__first_weekday, sizeof(__pyx_k__first_weekday), 0, 0, 1, 1},
  {&__pyx_n_s__flat, __pyx_k__flat, sizeof(__pyx_k__flat), 0, 0, 1, 1},
  {&__pyx_n_s__fmt, __pyx_k__fmt, sizeof(__pyx_k__fmt), 0, 0, 1, 1},
  {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
  {&__pyx_n_s__format_regex, __pyx_k__format_regex, sizeof(__pyx_k__format_regex), 0, 0, 1, 1},
  {&__pyx_n_s__found, __pyx_k__found, sizeof(__pyx_k__found), 0, 0, 1, 1},
  {&__pyx_n_s__found_dict, __pyx_k__found_dict, sizeof(__pyx_k__found_dict), 0, 0, 1, 1},
  {&__pyx_n_s__found_zone, __pyx_k__found_zone, sizeof(__pyx_k__found_zone), 0, 0, 1, 1},
  {&__pyx_n_s__frac, __pyx_k__frac, sizeof(__pyx_k__frac), 0, 0, 1, 1},
  {&__pyx_n_s__fraction, __pyx_k__fraction, sizeof(__pyx_k__fraction), 0, 0, 1, 1},
  {&__pyx_n_s__freq, __pyx_k__freq, sizeof(__pyx_k__freq), 0, 0, 1, 1},
  {&__pyx_n_s__freq1, __pyx_k__freq1, sizeof(__pyx_k__freq1), 0, 0, 1, 1},
  {&__pyx_n_s__freq2, __pyx_k__freq2, sizeof(__pyx_k__freq2), 0, 0, 1, 1},
  {&__pyx_n_s__freq_group, __pyx_k__freq_group, sizeof(__pyx_k__freq_group), 0, 0, 1, 1},
  {&__pyx_n_s__freqstr, __pyx_k__freqstr, sizeof(__pyx_k__freqstr), 0, 0, 1, 1},
  {&__pyx_n_s__fromordinal, __pyx_k__fromordinal, sizeof(__pyx_k__fromordinal), 0, 0, 1, 1},
  {&__pyx_n_s__front, __pyx_k__front, sizeof(__pyx_k__front), 0, 0, 1, 1},
  {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1},
  {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1},
  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
  {&__pyx_n_s__get_date_field, __pyx_k__get_date_field, sizeof(__pyx_k__get_date_field), 0, 0, 1, 1},
  {&__pyx_n_s__get_period_field, __pyx_k__get_period_field, sizeof(__pyx_k__get_period_field), 0, 0, 1, 1},
  {&__pyx_n_s__get_time_micros, __pyx_k__get_time_micros, sizeof(__pyx_k__get_time_micros), 0, 0, 1, 1},
  {&__pyx_n_s__get_timezone, __pyx_k__get_timezone, sizeof(__pyx_k__get_timezone), 0, 0, 1, 1},
  {&__pyx_n_s__getlocale, __pyx_k__getlocale, sizeof(__pyx_k__getlocale), 0, 0, 1, 1},
  {&__pyx_n_s__gmt, __pyx_k__gmt, sizeof(__pyx_k__gmt), 0, 0, 1, 1},
  {&__pyx_n_s__group_key, __pyx_k__group_key, sizeof(__pyx_k__group_key), 0, 0, 1, 1},
  {&__pyx_n_s__groupdict, __pyx_k__groupdict, sizeof(__pyx_k__groupdict), 0, 0, 1, 1},
  {&__pyx_n_s__grp, __pyx_k__grp, sizeof(__pyx_k__grp), 0, 0, 1, 1},
  {&__pyx_n_s__h, __pyx_k__h, sizeof(__pyx_k__h), 0, 0, 1, 1},
  {&__pyx_n_s__has_saving, __pyx_k__has_saving, sizeof(__pyx_k__has_saving), 0, 0, 1, 1},
  {&__pyx_n_s__have_pytz, __pyx_k__have_pytz, sizeof(__pyx_k__have_pytz), 0, 0, 1, 1},
  {&__pyx_n_s__hour, __pyx_k__hour, sizeof(__pyx_k__hour), 0, 0, 1, 1},
  {&__pyx_n_s__hours, __pyx_k__hours, sizeof(__pyx_k__hours), 0, 0, 1, 1},
  {&__pyx_n_s__hstack, __pyx_k__hstack, sizeof(__pyx_k__hstack), 0, 0, 1, 1},
  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
  {&__pyx_n_s__i4, __pyx_k__i4, sizeof(__pyx_k__i4), 0, 0, 1, 1},
  {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1},
  {&__pyx_n_s__i8_to_pydt, __pyx_k__i8_to_pydt, sizeof(__pyx_k__i8_to_pydt), 0, 0, 1, 1},
  {&__pyx_n_s__iNaT, __pyx_k__iNaT, sizeof(__pyx_k__iNaT), 0, 0, 1, 1},
  {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1},
  {&__pyx_n_s__idx_shifted, __pyx_k__idx_shifted, sizeof(__pyx_k__idx_shifted), 0, 0, 1, 1},
  {&__pyx_n_s__ignore, __pyx_k__ignore, sizeof(__pyx_k__ignore), 0, 0, 1, 1},
  {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
  {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1},
  {&__pyx_n_s__infer_dst, __pyx_k__infer_dst, sizeof(__pyx_k__infer_dst), 0, 0, 1, 1},
  {&__pyx_n_s__inferred_tz, __pyx_k__inferred_tz, sizeof(__pyx_k__inferred_tz), 0, 0, 1, 1},
  {&__pyx_n_s__insert, __pyx_k__insert, sizeof(__pyx_k__insert), 0, 0, 1, 1},
  {&__pyx_n_s__int32, __pyx_k__int32, sizeof(__pyx_k__int32), 0, 0, 1, 1},
  {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1},
  {&__pyx_n_s__ints_to_pydatetime, __pyx_k__ints_to_pydatetime, sizeof(__pyx_k__ints_to_pydatetime), 0, 0, 1, 1},
  {&__pyx_n_s__iresult, __pyx_k__iresult, sizeof(__pyx_k__iresult), 0, 0, 1, 1},
  {&__pyx_n_s__is_timestamp_array, __pyx_k__is_timestamp_array, sizeof(__pyx_k__is_timestamp_array), 0, 0, 1, 1},
  {&__pyx_n_s__isleap, __pyx_k__isleap, sizeof(__pyx_k__isleap), 0, 0, 1, 1},
  {&__pyx_n_s__isleap_prev, __pyx_k__isleap_prev, sizeof(__pyx_k__isleap_prev), 0, 0, 1, 1},
  {&__pyx_n_s__isleapyear, __pyx_k__isleapyear, sizeof(__pyx_k__isleapyear), 0, 0, 1, 1},
  {&__pyx_n_s__isoformat, __pyx_k__isoformat, sizeof(__pyx_k__isoformat), 0, 0, 1, 1},
  {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1},
  {&__pyx_n_s__iterkeys, __pyx_k__iterkeys, sizeof(__pyx_k__iterkeys), 0, 0, 1, 1},
  {&__pyx_n_s__ivalue, __pyx_k__ivalue, sizeof(__pyx_k__ivalue), 0, 0, 1, 1},
  {&__pyx_n_s__ivalues, __pyx_k__ivalues, sizeof(__pyx_k__ivalues), 0, 0, 1, 1},
  {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1},
  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
  {&__pyx_n_s__julian, __pyx_k__julian, sizeof(__pyx_k__julian), 0, 0, 1, 1},
  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
  {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1},
  {&__pyx_n_s__kwargs, __pyx_k__kwargs, sizeof(__pyx_k__kwargs), 0, 0, 1, 1},
  {&__pyx_n_s__kwds, __pyx_k__kwds, sizeof(__pyx_k__kwds), 0, 0, 1, 1},
  {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1},
  {&__pyx_n_s__lang, __pyx_k__lang, sizeof(__pyx_k__lang), 0, 0, 1, 1},
  {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1},
  {&__pyx_n_s__len, __pyx_k__len, sizeof(__pyx_k__len), 0, 0, 1, 1},
  {&__pyx_n_s__loc, __pyx_k__loc, sizeof(__pyx_k__loc), 0, 0, 1, 1},
  {&__pyx_n_s__locale, __pyx_k__locale, sizeof(__pyx_k__locale), 0, 0, 1, 1},
  {&__pyx_n_s__locale_time, __pyx_k__locale_time, sizeof(__pyx_k__locale_time), 0, 0, 1, 1},
  {&__pyx_n_s__localize, __pyx_k__localize, sizeof(__pyx_k__localize), 0, 0, 1, 1},
  {&__pyx_n_s__logical_and, __pyx_k__logical_and, sizeof(__pyx_k__logical_and), 0, 0, 1, 1},
  {&__pyx_n_s__long, __pyx_k__long, sizeof(__pyx_k__long), 0, 0, 1, 1},
  {&__pyx_n_s__lower, __pyx_k__lower, sizeof(__pyx_k__lower), 0, 0, 1, 1},
  {&__pyx_n_s__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1},
  {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1},
  {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1},
  {&__pyx_n_s__maximum, __pyx_k__maximum, sizeof(__pyx_k__maximum), 0, 0, 1, 1},
  {&__pyx_n_s__micros, __pyx_k__micros, sizeof(__pyx_k__micros), 0, 0, 1, 1},
  {&__pyx_n_s__microsecond, __pyx_k__microsecond, sizeof(__pyx_k__microsecond), 0, 0, 1, 1},
  {&__pyx_n_s__microseconds, __pyx_k__microseconds, sizeof(__pyx_k__microseconds), 0, 0, 1, 1},
  {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1},
  {&__pyx_n_s__minute, __pyx_k__minute, sizeof(__pyx_k__minute), 0, 0, 1, 1},
  {&__pyx_n_s__minutes, __pyx_k__minutes, sizeof(__pyx_k__minutes), 0, 0, 1, 1},
  {&__pyx_n_s__mo_off, __pyx_k__mo_off, sizeof(__pyx_k__mo_off), 0, 0, 1, 1},
  {&__pyx_n_s__month, __pyx_k__month, sizeof(__pyx_k__month), 0, 0, 1, 1},
  {&__pyx_n_s__month_abbr, __pyx_k__month_abbr, sizeof(__pyx_k__month_abbr), 0, 0, 1, 1},
  {&__pyx_n_s__month_name, __pyx_k__month_name, sizeof(__pyx_k__month_name), 0, 0, 1, 1},
  {&__pyx_n_s__monthrange, __pyx_k__monthrange, sizeof(__pyx_k__monthrange), 0, 0, 1, 1},
  {&__pyx_n_s__months, __pyx_k__months, sizeof(__pyx_k__months), 0, 0, 1, 1},
  {&__pyx_n_s__ms, __pyx_k__ms, sizeof(__pyx_k__ms), 0, 0, 1, 1},
  {&__pyx_n_s__mus, __pyx_k__mus, sizeof(__pyx_k__mus), 0, 0, 1, 1},
  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1},
  {&__pyx_n_s__nanos, __pyx_k__nanos, sizeof(__pyx_k__nanos), 0, 0, 1, 1},
  {&__pyx_n_s__nanosecond, __pyx_k__nanosecond, sizeof(__pyx_k__nanosecond), 0, 0, 1, 1},
  {&__pyx_n_s__nat, __pyx_k__nat, sizeof(__pyx_k__nat), 0, 0, 1, 1},
  {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1},
  {&__pyx_n_s__new, __pyx_k__new, sizeof(__pyx_k__new), 0, 0, 1, 1},
  {&__pyx_n_s__new_values, __pyx_k__new_values, sizeof(__pyx_k__new_values), 0, 0, 1, 1},
  {&__pyx_n_s__no_saving, __pyx_k__no_saving, sizeof(__pyx_k__no_saving), 0, 0, 1, 1},
  {&__pyx_n_s__nonzero, __pyx_k__nonzero, sizeof(__pyx_k__nonzero), 0, 0, 1, 1},
  {&__pyx_n_s__normalize, __pyx_k__normalize, sizeof(__pyx_k__normalize), 0, 0, 1, 1},
  {&__pyx_n_s__now, __pyx_k__now, sizeof(__pyx_k__now), 0, 0, 1, 1},
  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
  {&__pyx_n_s__np_NaT, __pyx_k__np_NaT, sizeof(__pyx_k__np_NaT), 0, 0, 1, 1},
  {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1},
  {&__pyx_n_s__ntrans, __pyx_k__ntrans, sizeof(__pyx_k__ntrans), 0, 0, 1, 1},
  {&__pyx_n_s__num, __pyx_k__num, sizeof(__pyx_k__num), 0, 0, 1, 1},
  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
  {&__pyx_n_s__object_state, __pyx_k__object_state, sizeof(__pyx_k__object_state), 0, 0, 1, 1},
  {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
  {&__pyx_n_s__old, __pyx_k__old, sizeof(__pyx_k__old), 0, 0, 1, 1},
  {&__pyx_n_s__one_diff, __pyx_k__one_diff, sizeof(__pyx_k__one_diff), 0, 0, 1, 1},
  {&__pyx_n_s__ordinal, __pyx_k__ordinal, sizeof(__pyx_k__ordinal), 0, 0, 1, 1},
  {&__pyx_n_s__ordinals, __pyx_k__ordinals, sizeof(__pyx_k__ordinals), 0, 0, 1, 1},
  {&__pyx_n_s__oresult, __pyx_k__oresult, sizeof(__pyx_k__oresult), 0, 0, 1, 1},
  {&__pyx_n_s__out, __pyx_k__out, sizeof(__pyx_k__out), 0, 0, 1, 1},
  {&__pyx_n_s__p, __pyx_k__p, sizeof(__pyx_k__p), 0, 0, 1, 1},
  {&__pyx_n_s__parse_code, __pyx_k__parse_code, sizeof(__pyx_k__parse_code), 0, 0, 1, 1},
  {&__pyx_n_s__parse_date, __pyx_k__parse_date, sizeof(__pyx_k__parse_date), 0, 0, 1, 1},
  {&__pyx_n_s__pattern, __pyx_k__pattern, sizeof(__pyx_k__pattern), 0, 0, 1, 1},
  {&__pyx_n_s__period_asfreq_arr, __pyx_k__period_asfreq_arr, sizeof(__pyx_k__period_asfreq_arr), 0, 0, 1, 1},
  {&__pyx_n_s__period_format, __pyx_k__period_format, sizeof(__pyx_k__period_format), 0, 0, 1, 1},
  {&__pyx_n_s__period_ordinal, __pyx_k__period_ordinal, sizeof(__pyx_k__period_ordinal), 0, 0, 1, 1},
  {&__pyx_n_s__periodarr, __pyx_k__periodarr, sizeof(__pyx_k__periodarr), 0, 0, 1, 1},
  {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
  {&__pyx_n_s__processed_format, __pyx_k__processed_format, sizeof(__pyx_k__processed_format), 0, 0, 1, 1},
  {&__pyx_n_s__prop, __pyx_k__prop, sizeof(__pyx_k__prop), 0, 0, 1, 1},
  {&__pyx_n_s__property, __pyx_k__property, sizeof(__pyx_k__property), 0, 0, 1, 1},
  {&__pyx_n_s__ps, __pyx_k__ps, sizeof(__pyx_k__ps), 0, 0, 1, 1},
  {&__pyx_n_s__pydt, __pyx_k__pydt, sizeof(__pyx_k__pydt), 0, 0, 1, 1},
  {&__pyx_n_s__pydt_to_i8, __pyx_k__pydt_to_i8, sizeof(__pyx_k__pydt_to_i8), 0, 0, 1, 1},
  {&__pyx_n_s__pytz, __pyx_k__pytz, sizeof(__pyx_k__pytz), 0, 0, 1, 1},
  {&__pyx_n_s__q, __pyx_k__q, sizeof(__pyx_k__q), 0, 0, 1, 1},
  {&__pyx_n_s__quarter, __pyx_k__quarter, sizeof(__pyx_k__quarter), 0, 0, 1, 1},
  {&__pyx_n_s__raise_, __pyx_k__raise_, sizeof(__pyx_k__raise_), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__ravel, __pyx_k__ravel, sizeof(__pyx_k__ravel), 0, 0, 1, 1},
  {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
  {&__pyx_n_s__re_compile, __pyx_k__re_compile, sizeof(__pyx_k__re_compile), 0, 0, 1, 1},
  {&__pyx_n_s__re_escape, __pyx_k__re_escape, sizeof(__pyx_k__re_escape), 0, 0, 1, 1},
  {&__pyx_n_s__regex, __pyx_k__regex, sizeof(__pyx_k__regex), 0, 0, 1, 1},
  {&__pyx_n_s__regex_chars, __pyx_k__regex_chars, sizeof(__pyx_k__regex_chars), 0, 0, 1, 1},
  {&__pyx_n_s__relation, __pyx_k__relation, sizeof(__pyx_k__relation), 0, 0, 1, 1},
  {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1},
  {&__pyx_n_s__replacement_pairs, __pyx_k__replacement_pairs, sizeof(__pyx_k__replacement_pairs), 0, 0, 1, 1},
  {&__pyx_n_s__repr_timedelta64, __pyx_k__repr_timedelta64, sizeof(__pyx_k__repr_timedelta64), 0, 0, 1, 1},
  {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1},
  {&__pyx_n_s__result_a, __pyx_k__result_a, sizeof(__pyx_k__result_a), 0, 0, 1, 1},
  {&__pyx_n_s__result_b, __pyx_k__result_b, sizeof(__pyx_k__result_b), 0, 0, 1, 1},
  {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1},
  {&__pyx_n_s__reverse, __pyx_k__reverse, sizeof(__pyx_k__reverse), 0, 0, 1, 1},
  {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1},
  {&__pyx_n_s__round, __pyx_k__round, sizeof(__pyx_k__round), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__sa_dtype, __pyx_k__sa_dtype, sizeof(__pyx_k__sa_dtype), 0, 0, 1, 1},
  {&__pyx_n_s__searchsorted, __pyx_k__searchsorted, sizeof(__pyx_k__searchsorted), 0, 0, 1, 1},
  {&__pyx_n_s__second, __pyx_k__second, sizeof(__pyx_k__second), 0, 0, 1, 1},
  {&__pyx_n_s__seconds, __pyx_k__seconds, sizeof(__pyx_k__seconds), 0, 0, 1, 1},
  {&__pyx_n_s__seconds_pretty, __pyx_k__seconds_pretty, sizeof(__pyx_k__seconds_pretty), 0, 0, 1, 1},
  {&__pyx_n_s__seen_datetime, __pyx_k__seen_datetime, sizeof(__pyx_k__seen_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__seen_integer, __pyx_k__seen_integer, sizeof(__pyx_k__seen_integer), 0, 0, 1, 1},
  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
  {&__pyx_n_s__sep, __pyx_k__sep, sizeof(__pyx_k__sep), 0, 0, 1, 1},
  {&__pyx_n_s__seq, __pyx_k__seq, sizeof(__pyx_k__seq), 0, 0, 1, 1},
  {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1},
  {&__pyx_n_s__short, __pyx_k__short, sizeof(__pyx_k__short), 0, 0, 1, 1},
  {&__pyx_n_s__short_version, __pyx_k__short_version, sizeof(__pyx_k__short_version), 0, 0, 1, 1},
  {&__pyx_n_s__side, __pyx_k__side, sizeof(__pyx_k__side), 0, 0, 1, 1},
  {&__pyx_n_s__sign, __pyx_k__sign, sizeof(__pyx_k__sign), 0, 0, 1, 1},
  {&__pyx_n_s__sign_pretty, __pyx_k__sign_pretty, sizeof(__pyx_k__sign_pretty), 0, 0, 1, 1},
  {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
  {&__pyx_n_s__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1},
  {&__pyx_n_s__sorted, __pyx_k__sorted, sizeof(__pyx_k__sorted), 0, 0, 1, 1},
  {&__pyx_n_s__sp, __pyx_k__sp, sizeof(__pyx_k__sp), 0, 0, 1, 1},
  {&__pyx_n_s__squeeze, __pyx_k__squeeze, sizeof(__pyx_k__squeeze), 0, 0, 1, 1},
  {&__pyx_n_s__stamp, __pyx_k__stamp, sizeof(__pyx_k__stamp), 0, 0, 1, 1},
  {&__pyx_n_s__stamps, __pyx_k__stamps, sizeof(__pyx_k__stamps), 0, 0, 1, 1},
  {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1},
  {&__pyx_n_s__state, __pyx_k__state, sizeof(__pyx_k__state), 0, 0, 1, 1},
  {&__pyx_n_s__strftime, __pyx_k__strftime, sizeof(__pyx_k__strftime), 0, 0, 1, 1},
  {&__pyx_n_s__struct_time, __pyx_k__struct_time, sizeof(__pyx_k__struct_time), 0, 0, 1, 1},
  {&__pyx_n_s__sub, __pyx_k__sub, sizeof(__pyx_k__sub), 0, 0, 1, 1},
  {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1},
  {&__pyx_n_s__switch_idx, __pyx_k__switch_idx, sizeof(__pyx_k__switch_idx), 0, 0, 1, 1},
  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
  {&__pyx_n_s__sz, __pyx_k__sz, sizeof(__pyx_k__sz), 0, 0, 1, 1},
  {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1},
  {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1},
  {&__pyx_n_s__td, __pyx_k__td, sizeof(__pyx_k__td), 0, 0, 1, 1},
  {&__pyx_n_s__tdata, __pyx_k__tdata, sizeof(__pyx_k__tdata), 0, 0, 1, 1},
  {&__pyx_n_s__thread, __pyx_k__thread, sizeof(__pyx_k__thread), 0, 0, 1, 1},
  {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1},
  {&__pyx_n_s__time_tuple, __pyx_k__time_tuple, sizeof(__pyx_k__time_tuple), 0, 0, 1, 1},
  {&__pyx_n_s__timedelta, __pyx_k__timedelta, sizeof(__pyx_k__timedelta), 0, 0, 1, 1},
  {&__pyx_n_s__timedelta64, __pyx_k__timedelta64, sizeof(__pyx_k__timedelta64), 0, 0, 1, 1},
  {&__pyx_n_s__timezone, __pyx_k__timezone, sizeof(__pyx_k__timezone), 0, 0, 1, 1},
  {&__pyx_n_s__to_convert, __pyx_k__to_convert, sizeof(__pyx_k__to_convert), 0, 0, 1, 1},
  {&__pyx_n_s__to_datetime, __pyx_k__to_datetime, sizeof(__pyx_k__to_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__to_period, __pyx_k__to_period, sizeof(__pyx_k__to_period), 0, 0, 1, 1},
  {&__pyx_n_s__to_pydatetime, __pyx_k__to_pydatetime, sizeof(__pyx_k__to_pydatetime), 0, 0, 1, 1},
  {&__pyx_n_s__today, __pyx_k__today, sizeof(__pyx_k__today), 0, 0, 1, 1},
  {&__pyx_n_s__toordinal, __pyx_k__toordinal, sizeof(__pyx_k__toordinal), 0, 0, 1, 1},
  {&__pyx_n_s__tot_seconds, __pyx_k__tot_seconds, sizeof(__pyx_k__tot_seconds), 0, 0, 1, 1},
  {&__pyx_n_s__total_seconds, __pyx_k__total_seconds, sizeof(__pyx_k__total_seconds), 0, 0, 1, 1},
  {&__pyx_n_s__trans, __pyx_k__trans, sizeof(__pyx_k__trans), 0, 0, 1, 1},
  {&__pyx_n_s__trans_cache, __pyx_k__trans_cache, sizeof(__pyx_k__trans_cache), 0, 0, 1, 1},
  {&__pyx_n_s__trans_grp, __pyx_k__trans_grp, sizeof(__pyx_k__trans_grp), 0, 0, 1, 1},
  {&__pyx_n_s__trans_idx, __pyx_k__trans_idx, sizeof(__pyx_k__trans_idx), 0, 0, 1, 1},
  {&__pyx_n_s__trans_len, __pyx_k__trans_len, sizeof(__pyx_k__trans_len), 0, 0, 1, 1},
  {&__pyx_n_s__ts, __pyx_k__ts, sizeof(__pyx_k__ts), 0, 0, 1, 1},
  {&__pyx_n_s__ts_base, __pyx_k__ts_base, sizeof(__pyx_k__ts_base), 0, 0, 1, 1},
  {&__pyx_n_s__ts_input, __pyx_k__ts_input, sizeof(__pyx_k__ts_input), 0, 0, 1, 1},
  {&__pyx_n_s__tso, __pyx_k__tso, sizeof(__pyx_k__tso), 0, 0, 1, 1},
  {&__pyx_n_s__tz, __pyx_k__tz, sizeof(__pyx_k__tz), 0, 0, 1, 1},
  {&__pyx_n_s__tz1, __pyx_k__tz1, sizeof(__pyx_k__tz1), 0, 0, 1, 1},
  {&__pyx_n_s__tz2, __pyx_k__tz2, sizeof(__pyx_k__tz2), 0, 0, 1, 1},
  {&__pyx_n_s__tz_convert, __pyx_k__tz_convert, sizeof(__pyx_k__tz_convert), 0, 0, 1, 1},
  {&__pyx_n_s__tz_convert_single, __pyx_k__tz_convert_single, sizeof(__pyx_k__tz_convert_single), 0, 0, 1, 1},
  {&__pyx_n_s__tz_localize, __pyx_k__tz_localize, sizeof(__pyx_k__tz_localize), 0, 0, 1, 1},
  {&__pyx_n_s__tz_localize_to_utc, __pyx_k__tz_localize_to_utc, sizeof(__pyx_k__tz_localize_to_utc), 0, 0, 1, 1},
  {&__pyx_n_s__tz_values, __pyx_k__tz_values, sizeof(__pyx_k__tz_values), 0, 0, 1, 1},
  {&__pyx_n_s__tzinfo, __pyx_k__tzinfo, sizeof(__pyx_k__tzinfo), 0, 0, 1, 1},
  {&__pyx_n_s__tzlocal, __pyx_k__tzlocal, sizeof(__pyx_k__tzlocal), 0, 0, 1, 1},
  {&__pyx_n_s__tzname, __pyx_k__tzname, sizeof(__pyx_k__tzname), 0, 0, 1, 1},
  {&__pyx_n_s__tzset, __pyx_k__tzset, sizeof(__pyx_k__tzset), 0, 0, 1, 1},
  {&__pyx_n_s__tzutc, __pyx_k__tzutc, sizeof(__pyx_k__tzutc), 0, 0, 1, 1},
  {&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1},
  {&__pyx_n_s__unique_deltas, __pyx_k__unique_deltas, sizeof(__pyx_k__unique_deltas), 0, 0, 1, 1},
  {&__pyx_n_s__uniques, __pyx_k__uniques, sizeof(__pyx_k__uniques), 0, 0, 1, 1},
  {&__pyx_n_s__unit, __pyx_k__unit, sizeof(__pyx_k__unit), 0, 0, 1, 1},
  {&__pyx_n_s__us, __pyx_k__us, sizeof(__pyx_k__us), 0, 0, 1, 1},
  {&__pyx_n_s__utc, __pyx_k__utc, sizeof(__pyx_k__utc), 0, 0, 1, 1},
  {&__pyx_n_s__utc_convert, __pyx_k__utc_convert, sizeof(__pyx_k__utc_convert), 0, 0, 1, 1},
  {&__pyx_n_s__utc_date, __pyx_k__utc_date, sizeof(__pyx_k__utc_date), 0, 0, 1, 1},
  {&__pyx_n_s__utc_dates, __pyx_k__utc_dates, sizeof(__pyx_k__utc_dates), 0, 0, 1, 1},
  {&__pyx_n_s__utc_offset_cache, __pyx_k__utc_offset_cache, sizeof(__pyx_k__utc_offset_cache), 0, 0, 1, 1},
  {&__pyx_n_s__utcnow, __pyx_k__utcnow, sizeof(__pyx_k__utcnow), 0, 0, 1, 1},
  {&__pyx_n_s__utcoffset, __pyx_k__utcoffset, sizeof(__pyx_k__utcoffset), 0, 0, 1, 1},
  {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
  {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
  {&__pyx_n_s__vals, __pyx_k__vals, sizeof(__pyx_k__vals), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
  {&__pyx_n_s__version, __pyx_k__version, sizeof(__pyx_k__version), 0, 0, 1, 1},
  {&__pyx_n_s__version_info, __pyx_k__version_info, sizeof(__pyx_k__version_info), 0, 0, 1, 1},
  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
  {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1},
  {&__pyx_n_s__warn, __pyx_k__warn, sizeof(__pyx_k__warn), 0, 0, 1, 1},
  {&__pyx_n_s__week, __pyx_k__week, sizeof(__pyx_k__week), 0, 0, 1, 1},
  {&__pyx_n_s__week_0_length, __pyx_k__week_0_length, sizeof(__pyx_k__week_0_length), 0, 0, 1, 1},
  {&__pyx_n_s__week_of_year, __pyx_k__week_of_year, sizeof(__pyx_k__week_of_year), 0, 0, 1, 1},
  {&__pyx_n_s__week_of_year_start, __pyx_k__week_of_year_start, sizeof(__pyx_k__week_of_year_start), 0, 0, 1, 1},
  {&__pyx_n_s__week_starts_Mon, __pyx_k__week_starts_Mon, sizeof(__pyx_k__week_starts_Mon), 0, 0, 1, 1},
  {&__pyx_n_s__weekday, __pyx_k__weekday, sizeof(__pyx_k__weekday), 0, 0, 1, 1},
  {&__pyx_n_s__weekofyear, __pyx_k__weekofyear, sizeof(__pyx_k__weekofyear), 0, 0, 1, 1},
  {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1},
  {&__pyx_n_s__woy, __pyx_k__woy, sizeof(__pyx_k__woy), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
  {&__pyx_n_s__year, __pyx_k__year, sizeof(__pyx_k__year), 0, 0, 1, 1},
  {&__pyx_n_s__year2000, __pyx_k__year2000, sizeof(__pyx_k__year2000), 0, 0, 1, 1},
  {&__pyx_n_s__years, __pyx_k__years, sizeof(__pyx_k__years), 0, 0, 1, 1},
  {&__pyx_n_s__zone, __pyx_k__zone, sizeof(__pyx_k__zone), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_NameError = __Pyx_GetName(__pyx_b, __pyx_n_s__NameError); if (!__pyx_builtin_NameError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_property = __Pyx_GetName(__pyx_b, __pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_super = __Pyx_GetName(__pyx_b, __pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_round = __Pyx_GetName(__pyx_b, __pyx_n_s__round); if (!__pyx_builtin_round) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_sorted = __Pyx_GetName(__pyx_b, __pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pandas/tslib.pyx":169
 *     @classmethod
 *     def utcnow(cls):
 *         return cls.now('UTC')             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, object ts_input, object offset=None, tz=None, unit=None):
 */
  __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__UTC));
  PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, ((PyObject *)__pyx_n_s__UTC));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UTC));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));

  /* "pandas/tslib.pyx":203
 * 
 *         try:
 *             result += self.strftime('%z')             # <<<<<<<<<<<<<<
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 */
  __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));

  /* "pandas/tslib.pyx":208
 *         except ValueError:
 *             year2000 = self.replace(year=2000)
 *             result += year2000.strftime('%z')             # <<<<<<<<<<<<<<
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_4);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "pandas/tslib.pyx":213
 * 
 *         try:
 *             result += zone.strftime(' %%Z')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_6);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));

  /* "pandas/tslib.pyx":279
 *     @property
 *     def dayofyear(self):
 *         return self._get_field('doy')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_15);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__doy));
  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_n_s__doy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__doy));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

  /* "pandas/tslib.pyx":283
 *     @property
 *     def week(self):
 *         return self._get_field('woy')             # <<<<<<<<<<<<<<
 * 
 *     weekofyear = week
 */
  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_16);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__woy));
  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));

  /* "pandas/tslib.pyx":289
 *     @property
 *     def quarter(self):
 *         return self._get_field('q')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_17);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__q));
  PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_n_s__q));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__q));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));

  /* "pandas/tslib.pyx":297
 *     @property
 *     def asm8(self):
 *         return np.int64(self.value).view('M8[ns]')             # <<<<<<<<<<<<<<
 * 
 *     def tz_localize(self, tz):
 */
  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_19);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));

  /* "pandas/tslib.pyx":315
 *             return Timestamp(self.to_pydatetime(), tz=tz)
 *         else:
 *             raise Exception('Cannot localize tz-aware Timestamp, use '             # <<<<<<<<<<<<<<
 *                             'tz_convert for conversions')
 * 
 */
  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "pandas/tslib.pyx":333
 *         if self.tzinfo is None:
 *             # tz naive, use tz_localize
 *             raise Exception('Cannot convert tz-naive Timestamp, use '             # <<<<<<<<<<<<<<
 *                             'tz_localize to localize')
 *         else:
 */
  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_22));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "pandas/tslib.pyx":469
 * 
 *     if i >= sz or sz == 0 or i < 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     if arr.descr.type_num == NPY_DATETIME:
 */
  __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_30);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));

  /* "pandas/tslib.pyx":529
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     new_values = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "pandas/tslib.pyx":640
 *         if self.tzinfo is None:
 *             if other.tzinfo is not None:
 *                 raise ValueError('Cannot compare tz-naive and tz-aware '             # <<<<<<<<<<<<<<
 *                                  'timestamps')
 *         elif other.tzinfo is None:
 */
  __pyx_k_tuple_34 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_34);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_34, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));

  /* "pandas/tslib.pyx":643
 *                                  'timestamps')
 *         elif other.tzinfo is None:
 *             raise ValueError('Cannot compare tz-naive and tz-aware timestamps')             # <<<<<<<<<<<<<<
 * 
 *     cpdef datetime to_datetime(_Timestamp self):
 */
  __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_35);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));

  /* "pandas/tslib.pyx":659
 * 
 *         if is_timedelta64_object(other):
 *             other_int = other.astype('timedelta64[ns]').astype(int)             # <<<<<<<<<<<<<<
 *             return Timestamp(self.value + other_int, tz=self.tzinfo)
 * 
 */
  __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_37);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_36));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));

  /* "pandas/tslib.pyx":664
 *         if is_integer_object(other):
 *             if self.offset is None:
 *                 raise ValueError("Cannot add integral value to Timestamp "             # <<<<<<<<<<<<<<
 *                                  "without offset.")
 *             return Timestamp((self.offset * other).apply(self))
 */
  __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_39);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_38));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));

  /* "pandas/tslib.pyx":732
 *         delta = delta.delta
 *     if is_timedelta64_object(delta):
 *         return delta.astype("timedelta64[ns]").item()             # <<<<<<<<<<<<<<
 *     if is_integer_object(delta):
 *         return delta
 */
  __pyx_k_tuple_41 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_41);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_36));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));

  /* "pandas/tslib.pyx":948
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = values[i]
 */
  __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "pandas/tslib.pyx":957
 *                 if inferred_tz is not None:
 *                     if _get_zone(val.tzinfo) != inferred_tz:
 *                         raise ValueError('Array must be all same time zone')             # <<<<<<<<<<<<<<
 *                 else:
 *                     inferred_tz = _get_zone(val.tzinfo)
 */
  __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_47);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_46));
  PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));

  /* "pandas/tslib.pyx":966
 *             else:
 *                 if inferred_tz is not None:
 *                     raise ValueError('Cannot mix tz-aware with tz-naive values')             # <<<<<<<<<<<<<<
 *                 iresult[i] = _pydatetime_to_dts(val, &dts)
 *                 _check_dts_bounds(&dts)
 */
  __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_49);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_48));
  PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_48));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));

  /* "pandas/tslib.pyx":977
 * 
 * def _does_string_look_like_datetime(date_string):
 *     if date_string.startswith('0'):             # <<<<<<<<<<<<<<
 *         # Strings starting with 0 are more consistent with a
 *         # date-like string than a number
 */
  __pyx_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_51);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__0));
  PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_kp_s__0));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__0));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));

  /* "pandas/tslib.pyx":995
 * def parse_datetime_string(date_string, **kwargs):
 *     if not _does_string_look_like_datetime(date_string):
 *         raise ValueError('Given date string not likely a datetime.')             # <<<<<<<<<<<<<<
 * 
 *     dt = parse_date(date_string, **kwargs)
 */
  __pyx_k_tuple_55 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_55);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_54));
  PyTuple_SET_ITEM(__pyx_k_tuple_55, 0, ((PyObject *)__pyx_kp_s_54));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_54));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));

  /* "pandas/tslib.pyx":1014
 *     try:
 *         result = np.empty(n, dtype='M8[ns]')
 *         iresult = result.view('i8')             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             val = values[i]
 */
  __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_59);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));

  /* "pandas/tslib.pyx":1033
 *                             raise
 *                     else:
 *                         raise ValueError('Tz-aware datetime.datetime cannot '             # <<<<<<<<<<<<<<
 *                                          'be converted to datetime64 unless '
 *                                          'utc=True')
 */
  __pyx_k_tuple_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_61);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
  PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_kp_s_60));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));

  /* "pandas/tslib.pyx":1126
 *         # example
 *         if seen_integer and seen_datetime:
 *             raise ValueError("mixed datetimes and integers in passed array")             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
  __pyx_k_tuple_64 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 0, ((PyObject *)__pyx_kp_s_63));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));

  /* "pandas/tslib.pyx":1179
 *     n = values.shape[0]
 *     result = np.empty(n, dtype='m8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_67);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));

  /* "pandas/tslib.pyx":1209
 *     elif util.is_datetime64_object(ts):
 *         # only accept a NaT here
 *         if ts.astype('int64') == iNaT:             # <<<<<<<<<<<<<<
 *             ts = np.timedelta64(iNaT)
 *     elif isinstance(ts, np.timedelta64):
 */
  __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_69);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__int64));
  PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));

  /* "pandas/tslib.pyx":1218
 *         else:
 *             if util.is_array(ts):
 *                 ts = ts.astype('int64').item()             # <<<<<<<<<<<<<<
 *             ts = cast_from_unit(ts, unit)
 *             if _np_version_under1p7:
 */
  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_71);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__int64));
  PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));

  /* "pandas/tslib.pyx":1242
 *             return np.timedelta64(iNaT)
 *         raise ValueError("Invalid type for timedelta scalar: %s" % type(ts))
 *     return ts.astype('timedelta64[ns]')             # <<<<<<<<<<<<<<
 * 
 * def repr_timedelta64(object value, format=None):
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_36));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));

  /* "pandas/tslib.pyx":1260
 *    cdef object ivalue
 * 
 *    ivalue = value.view('i8')             # <<<<<<<<<<<<<<
 * 
 *    # put frac in seconds
 */
  __pyx_k_tuple_75 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_75);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));

  /* "pandas/tslib.pyx":1322
 * 
 *     global _TimeRE_cache, _regex_cache
 *     with _cache_lock:             # <<<<<<<<<<<<<<
 *         if _getlang() != _TimeRE_cache.locale_time.lang:
 *             _TimeRE_cache = TimeRE()
 */
  __pyx_k_tuple_87 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_87);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 2, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));

  /* "pandas/tslib.pyx":1348
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 *     dts.us = dts.ps = dts.as = 0
 */
  __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_88);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));

  /* "pandas/tslib.pyx":1448
 *             elif parse_code == 7:
 *                 hour = int(found_dict['I'])
 *                 ampm = found_dict.get('p', '').lower()             # <<<<<<<<<<<<<<
 *                 # If there was no AM/PM indicator, we'll treat this like AM
 *                 if ampm in ('', locale_time.am_pm[0]):
 */
  __pyx_k_tuple_91 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_91);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__p));
  PyTuple_SET_ITEM(__pyx_k_tuple_91, 0, ((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
  PyTuple_SET_ITEM(__pyx_k_tuple_91, 1, ((PyObject *)__pyx_kp_s_25));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91));

  /* "pandas/tslib.pyx":1557
 *     unit = get_datetime64_unit(val)
 *     if unit == 3:
 *         raise ValueError('NumPy 1.6.1 business freq not supported')             # <<<<<<<<<<<<<<
 * 
 *     ival = get_datetime64_value(val)
 */
  __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_94);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_93));
  PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_kp_s_93));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_93));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));

  /* "pandas/tslib.pyx":1618
 *     unit = get_datetime64_unit(arr.flat[0])
 *     if unit == 3:
 *         raise ValueError('NumPy 1.6.1 business freq not supported')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_95);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_93));
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_kp_s_93));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_93));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));

  /* "pandas/tslib.pyx":1688
 *             pos = trans.searchsorted(vals[0]) - 1
 *             if pos < 0:
 *                 raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 * 
 *             offset = deltas[pos]
 */
  __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_97);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));

  /* "pandas/tslib.pyx":1719
 *     pos = trans.searchsorted(utc_dates[0])
 *     if pos == 0:
 *         raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 *     elif pos == len(trans):
 *         return utc_dates + deltas[-1]
 */
  __pyx_k_tuple_98 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_98);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, ((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));

  /* "pandas/tslib.pyx":1760
 *         pos = trans.searchsorted(val) - 1
 *         if pos < 0:
 *             raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 *         offset = deltas[pos]
 *         utc_date = val - offset
 */
  __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_99);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));

  /* "pandas/tslib.pyx":1779
 *     pos = trans.searchsorted(utc_date) - 1
 *     if pos < 0:
 *         raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 * 
 *     offset = deltas[pos]
 */
  __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_100);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_96));
  PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_96));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));

  /* "pandas/tslib.pyx":1801
 *         if hasattr(tz, '_utc_transition_times'):
 *             arr = np.array(tz._utc_transition_times, dtype='M8[ns]')
 *             arr = arr.view('i8')             # <<<<<<<<<<<<<<
 *             try:
 *                 if tz._utc_transition_times[0].year == 1:
 */
  __pyx_k_tuple_102 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_102);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));

  /* "pandas/tslib.pyx":1876
 * 
 *     if not have_pytz:
 *         raise Exception("Could not find pytz module")             # <<<<<<<<<<<<<<
 * 
 *     if tz == UTC or tz is None:
 */
  __pyx_k_tuple_104 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_104);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_103));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_kp_s_103));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_103));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));

  /* "pandas/tslib.pyx":2040
 *     count = len(dtindex)
 * 
 *     sa_dtype = [('Y', 'i4'), # year             # <<<<<<<<<<<<<<
 *                 ('M', 'i4'), # month
 *                 ('D', 'i4'), # day
 */
  __pyx_k_tuple_109 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_109);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Y));
  PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_n_s__Y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Y));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_109, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));

  /* "pandas/tslib.pyx":2041
 * 
 *     sa_dtype = [('Y', 'i4'), # year
 *                 ('M', 'i4'), # month             # <<<<<<<<<<<<<<
 *                 ('D', 'i4'), # day
 *                 ('h', 'i4'), # hour
 */
  __pyx_k_tuple_110 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_110);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__M));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_n_s__M));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__M));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));

  /* "pandas/tslib.pyx":2042
 *     sa_dtype = [('Y', 'i4'), # year
 *                 ('M', 'i4'), # month
 *                 ('D', 'i4'), # day             # <<<<<<<<<<<<<<
 *                 ('h', 'i4'), # hour
 *                 ('m', 'i4'), # min
 */
  __pyx_k_tuple_111 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_111);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_n_s__D));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));

  /* "pandas/tslib.pyx":2043
 *                 ('M', 'i4'), # month
 *                 ('D', 'i4'), # day
 *                 ('h', 'i4'), # hour             # <<<<<<<<<<<<<<
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second
 */
  __pyx_k_tuple_112 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_112);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__h));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_n_s__h));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__h));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));

  /* "pandas/tslib.pyx":2044
 *                 ('D', 'i4'), # day
 *                 ('h', 'i4'), # hour
 *                 ('m', 'i4'), # min             # <<<<<<<<<<<<<<
 *                 ('s', 'i4'), # second
 *                 ('u', 'i4')] # microsecond
 */
  __pyx_k_tuple_113 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));

  /* "pandas/tslib.pyx":2045
 *                 ('h', 'i4'), # hour
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second             # <<<<<<<<<<<<<<
 *                 ('u', 'i4')] # microsecond
 * 
 */
  __pyx_k_tuple_114 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_114);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_114, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));

  /* "pandas/tslib.pyx":2046
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second
 *                 ('u', 'i4')] # microsecond             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty(count, dtype=sa_dtype)
 */
  __pyx_k_tuple_115 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_115);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__u));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_n_s__u));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__u));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i4));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));

  /* "pandas/tslib.pyx":2381
 * 
 *     if month < 1 or month > 12:
 *         raise ValueError("bad month number 0; must be 1-12")             # <<<<<<<<<<<<<<
 * 
 *     days = days_per_month_table[is_leapyear(year)][month-1]
 */
  __pyx_k_tuple_118 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_118);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_117));
  PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, ((PyObject *)__pyx_kp_s_117));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_117));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));

  /* "pandas/tslib.pyx":2416
 * 
 *     if not have_pytz:
 *         raise Exception('Could not find pytz module')             # <<<<<<<<<<<<<<
 * 
 *     if _is_utc(tz):
 */
  __pyx_k_tuple_120 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_120);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_103));
  PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_kp_s_103));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_103));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));

  /* "pandas/tslib.pyx":2613
 * 
 *     if retval == INT32_MIN:
 *         raise ValueError('Frequency conversion failed')             # <<<<<<<<<<<<<<
 * 
 *     return retval
 */
  __pyx_k_tuple_122 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_122);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_121));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_kp_s_121));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_121));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));

  /* "pandas/tslib.pyx":2644
 *         val = func(arr[i], relation, &finfo)
 *         if val == INT32_MIN:
 *             raise ValueError("Unable to convert to desired frequency.")             # <<<<<<<<<<<<<<
 *         result[i] = val
 * 
 */
  __pyx_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_124);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_123));
  PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_kp_s_123));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_123));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));

  /* "pandas/tslib.pyx":2735
 * 
 *     if PyUnicode_Check(fmt):
 *         fmt = fmt.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     get_date_info(value, freq, &dinfo)
 */
  __pyx_k_tuple_138 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_138);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_137));
  PyTuple_SET_ITEM(__pyx_k_tuple_138, 0, ((PyObject *)__pyx_kp_s_137));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_137));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138));

  /* "pandas/tslib.pyx":2753
 *         if found_pat[i]:
 *             if get_yq(value, freq, &quarter, &year) < 0:
 *                 raise ValueError('Unable to get quarter and year')             # <<<<<<<<<<<<<<
 * 
 *             if i == 0:
 */
  __pyx_k_tuple_140 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_140);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_139));
  PyTuple_SET_ITEM(__pyx_k_tuple_140, 0, ((PyObject *)__pyx_kp_s_139));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_139));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140));

  /* "pandas/tslib.pyx":2771
 * 
 *     if PY2:
 *        result = result.decode('utf-8', 'ignore')             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_k_tuple_146 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_146);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_137));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 0, ((PyObject *)__pyx_kp_s_137));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_137));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore));
  PyTuple_SET_ITEM(__pyx_k_tuple_146, 1, ((PyObject *)__pyx_n_s__ignore));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_146));

  /* "pandas/tslib.pyx":3029
 *         self.__calc_date_time()
 *         if _getlang() != self.lang:
 *             raise ValueError("locale changed during initialization")             # <<<<<<<<<<<<<<
 * 
 *     def __pad(self, seq, front):
 */
  __pyx_k_tuple_155 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_155);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_154));
  PyTuple_SET_ITEM(__pyx_k_tuple_155, 0, ((PyObject *)__pyx_kp_s_154));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_154));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155));

  /* "pandas/tslib.pyx":3035
 *         seq = list(seq)
 *         if front:
 *             seq.insert(0, '')             # <<<<<<<<<<<<<<
 *         else:
 *             seq.append('')
 */
  __pyx_k_tuple_156 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_156);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_156, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
  PyTuple_SET_ITEM(__pyx_k_tuple_156, 1, ((PyObject *)__pyx_kp_s_25));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_156));

  /* "pandas/tslib.pyx":3062
 *         # static date was needed.
 *         am_pm = []
 *         for hour in (01,22):             # <<<<<<<<<<<<<<
 *             time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0))
 *             am_pm.append(time.strftime("%p", time_tuple).lower())
 */
  __pyx_k_tuple_157 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_157);
  __Pyx_INCREF(__pyx_int_01);
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 0, __pyx_int_01);
  __Pyx_GIVEREF(__pyx_int_01);
  __Pyx_INCREF(__pyx_int_22);
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 1, __pyx_int_22);
  __Pyx_GIVEREF(__pyx_int_22);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157));

  /* "pandas/tslib.pyx":3075
 *         # values within the format string is very important; it eliminates
 *         # possible ambiguity for what something represents.
 *         time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0))             # <<<<<<<<<<<<<<
 *         date_time = [None, None, None]
 *         date_time[0] = time.strftime("%c", time_tuple).lower()
 */
  __pyx_k_tuple_159 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_159);
  __Pyx_INCREF(__pyx_int_1999);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 0, __pyx_int_1999);
  __Pyx_GIVEREF(__pyx_int_1999);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 1, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_17);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 2, __pyx_int_17);
  __Pyx_GIVEREF(__pyx_int_17);
  __Pyx_INCREF(__pyx_int_22);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 3, __pyx_int_22);
  __Pyx_GIVEREF(__pyx_int_22);
  __Pyx_INCREF(__pyx_int_44);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 4, __pyx_int_44);
  __Pyx_GIVEREF(__pyx_int_44);
  __Pyx_INCREF(__pyx_int_55);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 5, __pyx_int_55);
  __Pyx_GIVEREF(__pyx_int_55);
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 6, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __Pyx_INCREF(__pyx_int_76);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 7, __pyx_int_76);
  __Pyx_GIVEREF(__pyx_int_76);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_159, 8, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
  __pyx_k_tuple_160 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_160);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_159));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 0, ((PyObject *)__pyx_k_tuple_159));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_160));

  /* "pandas/tslib.pyx":3080
 *         date_time[1] = time.strftime("%x", time_tuple).lower()
 *         date_time[2] = time.strftime("%X", time_tuple).lower()
 *         replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'),             # <<<<<<<<<<<<<<
 *                     (self.f_month[3], '%B'), (self.a_weekday[2], '%a'),
 *                     (self.a_month[3], '%b'), (self.am_pm[1], '%p'),
 */
  __pyx_k_tuple_165 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_165);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_84));
  PyTuple_SET_ITEM(__pyx_k_tuple_165, 0, ((PyObject *)__pyx_kp_s_84));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_84));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_164));
  PyTuple_SET_ITEM(__pyx_k_tuple_165, 1, ((PyObject *)__pyx_kp_s_164));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_164));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_165));

  /* "pandas/tslib.pyx":3083
 *                     (self.f_month[3], '%B'), (self.a_weekday[2], '%a'),
 *                     (self.a_month[3], '%b'), (self.am_pm[1], '%p'),
 *                     ('1999', '%Y'), ('99', '%y'), ('22', '%H'),             # <<<<<<<<<<<<<<
 *                     ('44', '%M'), ('55', '%S'), ('76', '%j'),
 *                     ('17', '%d'), ('03', '%m'), ('3', '%m'),
 */
  __pyx_k_tuple_170 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_170);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__1999));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 0, ((PyObject *)__pyx_kp_s__1999));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__1999));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_125));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 1, ((PyObject *)__pyx_kp_s_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));
  __pyx_k_tuple_172 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_172);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__99));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 0, ((PyObject *)__pyx_kp_s__99));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__99));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_171));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 1, ((PyObject *)__pyx_kp_s_171));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_171));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172));
  __pyx_k_tuple_174 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_174);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__22));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 0, ((PyObject *)__pyx_kp_s__22));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__22));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_173));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 1, ((PyObject *)__pyx_kp_s_173));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_173));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));

  /* "pandas/tslib.pyx":3084
 *                     (self.a_month[3], '%b'), (self.am_pm[1], '%p'),
 *                     ('1999', '%Y'), ('99', '%y'), ('22', '%H'),
 *                     ('44', '%M'), ('55', '%S'), ('76', '%j'),             # <<<<<<<<<<<<<<
 *                     ('17', '%d'), ('03', '%m'), ('3', '%m'),
 *                     # '3' needed for when no leading zero.
 */
  __pyx_k_tuple_176 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_176);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__44));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 0, ((PyObject *)__pyx_kp_s__44));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__44));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_175));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 1, ((PyObject *)__pyx_kp_s_175));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_175));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176));
  __pyx_k_tuple_178 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_178);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__55));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 0, ((PyObject *)__pyx_kp_s__55));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__55));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_177));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 1, ((PyObject *)__pyx_kp_s_177));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_177));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
  __pyx_k_tuple_180 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_180);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__76));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 0, ((PyObject *)__pyx_kp_s__76));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__76));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_179));
  PyTuple_SET_ITEM(__pyx_k_tuple_180, 1, ((PyObject *)__pyx_kp_s_179));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_179));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180));

  /* "pandas/tslib.pyx":3085
 *                     ('1999', '%Y'), ('99', '%y'), ('22', '%H'),
 *                     ('44', '%M'), ('55', '%S'), ('76', '%j'),
 *                     ('17', '%d'), ('03', '%m'), ('3', '%m'),             # <<<<<<<<<<<<<<
 *                     # '3' needed for when no leading zero.
 *                     ('2', '%w'), ('10', '%I')]
 */
  __pyx_k_tuple_181 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_181);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__17));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 0, ((PyObject *)__pyx_kp_s__17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__17));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_141));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 1, ((PyObject *)__pyx_kp_s_141));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_141));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
  __pyx_k_tuple_183 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_183);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__03));
  PyTuple_SET_ITEM(__pyx_k_tuple_183, 0, ((PyObject *)__pyx_kp_s__03));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__03));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_182));
  PyTuple_SET_ITEM(__pyx_k_tuple_183, 1, ((PyObject *)__pyx_kp_s_182));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_182));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183));
  __pyx_k_tuple_184 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_184);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__3));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 0, ((PyObject *)__pyx_kp_s__3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__3));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_182));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 1, ((PyObject *)__pyx_kp_s_182));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_182));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));

  /* "pandas/tslib.pyx":3087
 *                     ('17', '%d'), ('03', '%m'), ('3', '%m'),
 *                     # '3' needed for when no leading zero.
 *                     ('2', '%w'), ('10', '%I')]             # <<<<<<<<<<<<<<
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone
 *                                                 for tz in tz_values])
 */
  __pyx_k_tuple_186 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_186);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__2));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 0, ((PyObject *)__pyx_kp_s__2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__2));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_185));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 1, ((PyObject *)__pyx_kp_s_185));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_185));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
  __pyx_k_tuple_188 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_188);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__10));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 0, ((PyObject *)__pyx_kp_s__10));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__10));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_187));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 1, ((PyObject *)__pyx_kp_s_187));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_187));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));

  /* "pandas/tslib.pyx":3090
 *         replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone
 *                                                 for tz in tz_values])
 *         for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')):             # <<<<<<<<<<<<<<
 *             current_format = date_time[offset]
 *             for old, new in replacement_pairs:
 */
  __pyx_k_tuple_190 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_190);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_161));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 1, ((PyObject *)__pyx_kp_s_161));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_161));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __pyx_k_tuple_191 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_191);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_191, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_162));
  PyTuple_SET_ITEM(__pyx_k_tuple_191, 1, ((PyObject *)__pyx_kp_s_162));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_162));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_191));
  __pyx_k_tuple_192 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_192);
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 0, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_163));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 1, ((PyObject *)__pyx_kp_s_163));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_163));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __pyx_k_tuple_193 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_193);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_190));
  PyTuple_SET_ITEM(__pyx_k_tuple_193, 0, ((PyObject *)__pyx_k_tuple_190));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_191));
  PyTuple_SET_ITEM(__pyx_k_tuple_193, 1, ((PyObject *)__pyx_k_tuple_191));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_191));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_192));
  PyTuple_SET_ITEM(__pyx_k_tuple_193, 2, ((PyObject *)__pyx_k_tuple_192));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193));

  /* "pandas/tslib.pyx":3102
 *             # 2005-01-03 occurs before the first Monday of the year.  Otherwise
 *             # %U is used.
 *             time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0))             # <<<<<<<<<<<<<<
 *             if '00' in time.strftime(directive, time_tuple):
 *                 U_W = '%W'
 */
  __pyx_k_tuple_194 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_194);
  __Pyx_INCREF(__pyx_int_1999);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 0, __pyx_int_1999);
  __Pyx_GIVEREF(__pyx_int_1999);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 2, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 3, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 4, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 5, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_6);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 6, __pyx_int_6);
  __Pyx_GIVEREF(__pyx_int_6);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 7, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 8, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
  __pyx_k_tuple_195 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_195);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_194));
  PyTuple_SET_ITEM(__pyx_k_tuple_195, 0, ((PyObject *)__pyx_k_tuple_194));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195));

  /* "pandas/tslib.pyx":3168
 *                                 'Z'),
 *             '%': '%'})
 *         base.__setitem__('W', base.__getitem__('U').replace('U', 'W'))             # <<<<<<<<<<<<<<
 *         base.__setitem__('c', self.pattern(self.locale_time.LC_date_time))
 *         base.__setitem__('x', self.pattern(self.locale_time.LC_date))
 */
  __pyx_k_tuple_210 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_210)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_210);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__U));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 0, ((PyObject *)__pyx_n_s__U));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__U));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_210));
  __pyx_k_tuple_211 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_211);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__U));
  PyTuple_SET_ITEM(__pyx_k_tuple_211, 0, ((PyObject *)__pyx_n_s__U));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__U));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__W));
  PyTuple_SET_ITEM(__pyx_k_tuple_211, 1, ((PyObject *)__pyx_n_s__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_211));

  /* "pandas/tslib.pyx":3203
 *         # as regex syntax.  Cannot use re.escape since we have to deal with
 *         # format directives (%m, etc.).
 *         regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")             # <<<<<<<<<<<<<<
 *         format = regex_chars.sub(r"\\\1", format)
 *         whitespace_replacement = re_compile('\s+')
 */
  __pyx_k_tuple_216 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_216);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_215));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 0, ((PyObject *)__pyx_kp_s_215));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_215));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216));

  /* "pandas/tslib.pyx":3205
 *         regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")
 *         format = regex_chars.sub(r"\\\1", format)
 *         whitespace_replacement = re_compile('\s+')             # <<<<<<<<<<<<<<
 *         format = whitespace_replacement.sub('\s+', format)
 *         while '%' in format:
 */
  __pyx_k_tuple_219 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_219)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_219);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_218));
  PyTuple_SET_ITEM(__pyx_k_tuple_219, 0, ((PyObject *)__pyx_kp_s_218));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_218));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_219));

  /* "pandas/tslib.pyx":3208
 *         format = whitespace_replacement.sub('\s+', format)
 *         while '%' in format:
 *             directive_index = format.index('%')+1             # <<<<<<<<<<<<<<
 *             processed_format = "%s%s%s" % (processed_format,
 *                                            format[:directive_index-1],
 */
  __pyx_k_tuple_220 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_220);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_84));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 0, ((PyObject *)__pyx_kp_s_84));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_84));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220));

  /* "numpy.pxd":217
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_k_tuple_225 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_225)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_225);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_224));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 0, ((PyObject *)__pyx_kp_u_224));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_224));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_225));

  /* "numpy.pxd":221
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_k_tuple_227 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_227)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_227);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_226));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 0, ((PyObject *)__pyx_kp_u_226));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_226));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_227));

  /* "numpy.pxd":259
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_k_tuple_229 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_229)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_229);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_228));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 0, ((PyObject *)__pyx_kp_u_228));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_228));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_229));

  /* "numpy.pxd":803
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 */
  __pyx_k_tuple_232 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_232);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_231));
  PyTuple_SET_ITEM(__pyx_k_tuple_232, 0, ((PyObject *)__pyx_kp_u_231));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_231));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232));

  /* "numpy.pxd":807
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_k_tuple_233 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_233)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_233);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_228));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 0, ((PyObject *)__pyx_kp_u_228));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_228));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_233));

  /* "numpy.pxd":827
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_k_tuple_235 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_235)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_235);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_234));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 0, ((PyObject *)__pyx_kp_u_234));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_234));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_235));

  /* "util.pxd":40
 *         i += sz
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
  __pyx_k_tuple_236 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_236)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_236);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_236, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_236));

  /* "util.pxd":57
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
  __pyx_k_tuple_237 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_237)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_237);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_237));

  /* "pandas/tslib.pyx":63
 * 
 * # < numpy 1.7 compat for NaT
 * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item()             # <<<<<<<<<<<<<<
 * 
 * # numpy actual nat object
 */
  __pyx_k_tuple_243 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_243);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
  PyTuple_SET_ITEM(__pyx_k_tuple_243, 0, ((PyObject *)__pyx_kp_s_66));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_243));

  /* "pandas/tslib.pyx":66
 * 
 * # numpy actual nat object
 * np_NaT = np.datetime64('NaT',dtype='M8')             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_k_tuple_244 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_244);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT));
  PyTuple_SET_ITEM(__pyx_k_tuple_244, 0, ((PyObject *)__pyx_n_s__NaT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NaT));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_244));

  /* "pandas/tslib.pyx":73
 *     basestring = str
 * 
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_245 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_245);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 4, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 6, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 7, ((PyObject *)__pyx_n_s__trans));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__deltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 8, ((PyObject *)__pyx_n_s__deltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltas));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 9, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inf));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 10, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_245));
  __pyx_k_codeobj_246 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__ints_to_pydatetime, 73, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_246)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":128
 * from dateutil.tz import tzlocal
 * 
 * def _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *     return isinstance(tz, tzlocal)
 * 
 */
  __pyx_k_tuple_250 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_250);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250));
  __pyx_k_codeobj_251 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___is_tzlocal, 128, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":131
 *     return isinstance(tz, tzlocal)
 * 
 * def _is_fixed_offset(tz):             # <<<<<<<<<<<<<<
 *     try:
 *         tz._transition_info
 */
  __pyx_k_tuple_252 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_252)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_252);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_252, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_252));
  __pyx_k_codeobj_253 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___is_fixed_offset, 131, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":138
 *         return True
 * 
 * _zero_time = datetime_time(0, 0)             # <<<<<<<<<<<<<<
 * 
 * # Python front end to C extension type _Timestamp
 */
  __pyx_k_tuple_254 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_254);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_254));

  /* "pandas/tslib.pyx":150
 * 
 *     @classmethod
 *     def fromordinal(cls, ordinal, offset=None, tz=None):             # <<<<<<<<<<<<<<
 *         """ passed an ordinal, translate and convert to a ts
 *             note: by definition there cannot be any tz info on the ordinal itself """
 */
  __pyx_k_tuple_255 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_255);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_255, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ordinal));
  PyTuple_SET_ITEM(__pyx_k_tuple_255, 1, ((PyObject *)__pyx_n_s__ordinal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ordinal));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_255, 2, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_255, 3, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_255));
  __pyx_k_codeobj_256 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__fromordinal, 150, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_257 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_257);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_257, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_257, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_257));

  /* "pandas/tslib.pyx":156
 * 
 *     @classmethod
 *     def now(cls, tz=None):             # <<<<<<<<<<<<<<
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):
 */
  __pyx_k_tuple_258 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_258);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_258, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_258, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_258));
  __pyx_k_codeobj_259 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__now, 156, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_260 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_260);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_260, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_260));

  /* "pandas/tslib.pyx":163
 * 
 *     @classmethod
 *     def today(cls):             # <<<<<<<<<<<<<<
 *         """ compat today with datetime """
 *         return cls(datetime.today())
 */
  __pyx_k_tuple_261 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_261);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_261, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_261));
  __pyx_k_codeobj_262 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__today, 163, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_262)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":168
 * 
 *     @classmethod
 *     def utcnow(cls):             # <<<<<<<<<<<<<<
 *         return cls.now('UTC')
 * 
 */
  __pyx_k_tuple_263 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_263)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_263);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_263, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_263));
  __pyx_k_codeobj_264 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__utcnow, 168, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":171
 *         return cls.now('UTC')
 * 
 *     def __new__(cls, object ts_input, object offset=None, tz=None, unit=None):             # <<<<<<<<<<<<<<
 *         cdef _TSObject ts
 *         cdef _Timestamp ts_base
 */
  __pyx_k_tuple_265 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_265);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts_input));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 1, ((PyObject *)__pyx_n_s__ts_input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts_input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 2, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 3, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__unit));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 4, ((PyObject *)__pyx_n_s__unit));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__unit));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 5, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts_base));
  PyTuple_SET_ITEM(__pyx_k_tuple_265, 6, ((PyObject *)__pyx_n_s__ts_base));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts_base));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265));
  __pyx_k_codeobj_266 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____new__, 171, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_266)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_267 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_267);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_267, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267));

  /* "pandas/tslib.pyx":198
 *         return ts_base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         result = self._repr_base
 *         zone = None
 */
  __pyx_k_tuple_268 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_268);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 1, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__zone));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 2, ((PyObject *)__pyx_n_s__zone));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__zone));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year2000));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 3, ((PyObject *)__pyx_n_s__year2000));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year2000));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_268));
  __pyx_k_codeobj_269 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____repr__, 198, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_269)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":221
 * 
 *     @property
 *     def _date_repr(self):             # <<<<<<<<<<<<<<
 *         # Ideal here would be self.strftime("%Y-%m-%d"), but
 *         # the datetime strftime() methods require year >= 1900
 */
  __pyx_k_tuple_270 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_270);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_270, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_270));
  __pyx_k_codeobj_271 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___date_repr, 221, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":227
 * 
 *     @property
 *     def _time_repr(self):             # <<<<<<<<<<<<<<
 *         result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)
 * 
 */
  __pyx_k_tuple_272 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_272)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_272);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 1, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nanos));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 2, ((PyObject *)__pyx_n_s__nanos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nanos));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_272));
  __pyx_k_codeobj_273 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___time_repr, 227, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":239
 * 
 *     @property
 *     def _repr_base(self):             # <<<<<<<<<<<<<<
 *         return '%s %s' % (self._date_repr, self._time_repr)
 * 
 */
  __pyx_k_tuple_274 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_274);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_274, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_274));
  __pyx_k_codeobj_275 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___repr_base, 239, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":243
 * 
 *     @property
 *     def tz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for tzinfo
 */
  __pyx_k_tuple_276 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_276);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_276, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_276));
  __pyx_k_codeobj_277 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tz, 243, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":250
 * 
 *     @property
 *     def freq(self):             # <<<<<<<<<<<<<<
 *         return self.offset
 * 
 */
  __pyx_k_tuple_278 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_278);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_278, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_278));
  __pyx_k_codeobj_279 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__freq, 250, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_279)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":253
 *         return self.offset
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.value = state[0]
 *         self.offset = state[1]
 */
  __pyx_k_tuple_280 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_280);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__state));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 1, ((PyObject *)__pyx_n_s__state));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__state));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_280));
  __pyx_k_codeobj_281 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____setstate__, 253, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":258
 *         self.tzinfo = state[2]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         object_state = self.value, self.offset, self.tzinfo
 *         return (Timestamp, object_state)
 */
  __pyx_k_tuple_282 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_282)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_282);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__object_state));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 1, ((PyObject *)__pyx_n_s__object_state));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__object_state));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_282));
  __pyx_k_codeobj_283 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____reduce__, 258, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":262
 *         return (Timestamp, object_state)
 * 
 *     def to_period(self, freq=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return an period of which this timestamp is an observation.
 */
  __pyx_k_tuple_284 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_284);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 1, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Period));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 2, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_284));
  __pyx_k_codeobj_285 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__to_period, 262, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_285)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_286 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_286);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286));

  /* "pandas/tslib.pyx":274
 * 
 *     @property
 *     def dayofweek(self):             # <<<<<<<<<<<<<<
 *         return self.weekday()
 * 
 */
  __pyx_k_tuple_287 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_287);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_287, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_287));
  __pyx_k_codeobj_288 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__dayofweek, 274, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_288)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":278
 * 
 *     @property
 *     def dayofyear(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('doy')
 * 
 */
  __pyx_k_tuple_289 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_289);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_289, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_289));
  __pyx_k_codeobj_290 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__dayofyear, 278, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":282
 * 
 *     @property
 *     def week(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('woy')
 * 
 */
  __pyx_k_tuple_291 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_291)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_291);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_291, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_291));
  __pyx_k_codeobj_292 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__week, 282, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":288
 * 
 *     @property
 *     def quarter(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('q')
 * 
 */
  __pyx_k_tuple_293 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_293);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_293, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_293));
  __pyx_k_codeobj_294 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__quarter, 288, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_294)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":292
 * 
 *     @property
 *     def freqstr(self):             # <<<<<<<<<<<<<<
 *         return getattr(self.offset, 'freqstr', self.offset)
 * 
 */
  __pyx_k_tuple_295 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_295);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_295, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_295));
  __pyx_k_codeobj_296 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__freqstr, 292, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":296
 * 
 *     @property
 *     def asm8(self):             # <<<<<<<<<<<<<<
 *         return np.int64(self.value).view('M8[ns]')
 * 
 */
  __pyx_k_tuple_297 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_297);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_297, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_297));
  __pyx_k_codeobj_298 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__asm8, 296, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_298)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":299
 *         return np.int64(self.value).view('M8[ns]')
 * 
 *     def tz_localize(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert naive Timestamp to local time zone
 */
  __pyx_k_tuple_299 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_299);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_299, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_299, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_299));
  __pyx_k_codeobj_300 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tz_localize, 299, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":318
 *                             'tz_convert for conversions')
 * 
 *     def tz_convert(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Timestamp to another time zone or localize to requested time
 */
  __pyx_k_tuple_301 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_301)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_301);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_301, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_301, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_301));
  __pyx_k_codeobj_302 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tz_convert, 318, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_302)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":341
 *     astimezone = tz_convert
 * 
 *     def replace(self, **kwds):             # <<<<<<<<<<<<<<
 *         return Timestamp(datetime.replace(self, **kwds),
 *                          offset=self.offset)
 */
  __pyx_k_tuple_303 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_303)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_303);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_303, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kwds));
  PyTuple_SET_ITEM(__pyx_k_tuple_303, 1, ((PyObject *)__pyx_n_s__kwds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kwds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kwds));
  PyTuple_SET_ITEM(__pyx_k_tuple_303, 2, ((PyObject *)__pyx_n_s__kwds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kwds));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_303));
  __pyx_k_codeobj_304 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__replace, 341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_304)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":345
 *                          offset=self.offset)
 * 
 *     def to_pydatetime(self, warn=True):             # <<<<<<<<<<<<<<
 *         """
 *         If warn=True, issue warning if nanoseconds is nonzero
 */
  __pyx_k_tuple_305 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_305);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_305, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__warn));
  PyTuple_SET_ITEM(__pyx_k_tuple_305, 1, ((PyObject *)__pyx_n_s__warn));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__warn));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_305, 2, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_305, 3, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_305));
  __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__to_pydatetime, 345, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":361
 *                         ts.dts.us, ts.tzinfo)
 * 
 *     def isoformat(self, sep='T'):             # <<<<<<<<<<<<<<
 *         base = super(_Timestamp, self).isoformat(sep=sep)
 *         if self.nanosecond == 0:
 */
  __pyx_k_tuple_307 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_307)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_307);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_307, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sep));
  PyTuple_SET_ITEM(__pyx_k_tuple_307, 1, ((PyObject *)__pyx_n_s__sep));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sep));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base));
  PyTuple_SET_ITEM(__pyx_k_tuple_307, 2, ((PyObject *)__pyx_n_s__base));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base1));
  PyTuple_SET_ITEM(__pyx_k_tuple_307, 3, ((PyObject *)__pyx_n_s__base1));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base2));
  PyTuple_SET_ITEM(__pyx_k_tuple_307, 4, ((PyObject *)__pyx_n_s__base2));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_307));
  __pyx_k_codeobj_308 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__isoformat, 361, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_308)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_309 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_309)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_309);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_n_s__T)));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 0, ((PyObject *)((PyObject*)__pyx_n_s__T)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_n_s__T)));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_309));

  /* "pandas/tslib.pyx":378
 *         return base1 + base2
 * 
 *     def _has_time_component(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns if the Timestamp has a time component
 */
  __pyx_k_tuple_310 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_310)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_310);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_310, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_310));
  __pyx_k_codeobj_311 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___has_time_component, 378, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_311)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":392
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef _NaT base
 * 
 */
  __pyx_k_tuple_313 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_313)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_313);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_313, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base));
  PyTuple_SET_ITEM(__pyx_k_tuple_313, 1, ((PyObject *)__pyx_n_s__base));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_313));
  __pyx_k_codeobj_314 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____new__, 392, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_314)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":401
 *         return base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_k_tuple_315 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_315)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_315);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_315));
  __pyx_k_codeobj_316 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____repr__, 401, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_316)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":404
 *         return 'NaT'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_k_tuple_317 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_317)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_317);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_317, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_317));
  __pyx_k_codeobj_318 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____str__, 404, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_318)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":407
 *         return 'NaT'
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return iNaT
 * 
 */
  __pyx_k_tuple_319 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_319)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_319);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_319, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_319));
  __pyx_k_codeobj_320 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____hash__, 407, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_320)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":410
 *         return iNaT
 * 
 *     def weekday(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_k_tuple_321 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_321)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_321);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_321, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_321));
  __pyx_k_codeobj_322 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__weekday, 410, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_322)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":413
 *         return -1
 * 
 *     def toordinal(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_k_tuple_323 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_323)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_323);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_323));
  __pyx_k_codeobj_324 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__toordinal, 413, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_324)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":444
 *         return ', tz=%s' % zone
 * 
 * def is_timestamp_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_326 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_326)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_326);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_326));
  __pyx_k_codeobj_327 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__is_timestamp_array, 444, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_327)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":494
 * # Frequency inference
 * 
 * def unique_deltas(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_328 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_328)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_328);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 5, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 6, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 7, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_328, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_328));
  __pyx_k_codeobj_329 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__unique_deltas, 494, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_329)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":522
 * 
 * 
 * def apply_offset(ndarray[object] values, object offset):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_330 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_330)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_330);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 1, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__new_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 4, ((PyObject *)__pyx_n_s__new_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__new_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__boxed));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 5, ((PyObject *)__pyx_n_s__boxed));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__boxed));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_330, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_330));
  __pyx_k_codeobj_331 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__apply_offset, 522, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_331)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":728
 * 
 * 
 * def _delta_to_nanoseconds(delta):             # <<<<<<<<<<<<<<
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta
 */
  __pyx_k_tuple_332 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_332)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_332);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__delta));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 0, ((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_332));
  __pyx_k_codeobj_333 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_40, 728, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_333)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":890
 * 
 * 
 * def get_timezone(tz):             # <<<<<<<<<<<<<<
 *     return _get_zone(tz)
 * 
 */
  __pyx_k_tuple_334 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_334)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_334);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_334, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_334));
  __pyx_k_codeobj_335 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__get_timezone, 890, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_335)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":939
 * #     obj.dtval = _dts_to_pydatetime(&obj.dts)
 * 
 * def datetime_to_datetime64(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_336 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_336)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_336);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inferred_tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 4, ((PyObject *)__pyx_n_s__inferred_tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inferred_tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 5, ((PyObject *)__pyx_n_s__iresult));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iresult));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 6, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 7, ((PyObject *)__pyx_n_s___ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___ts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_336));
  __pyx_k_codeobj_337 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_338, 939, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_337)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":976
 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T'])
 * 
 * def _does_string_look_like_datetime(date_string):             # <<<<<<<<<<<<<<
 *     if date_string.startswith('0'):
 *         # Strings starting with 0 are more consistent with a
 */
  __pyx_k_tuple_339 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_339)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_339);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date_string));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 0, ((PyObject *)__pyx_n_s__date_string));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date_string));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_339));
  __pyx_k_codeobj_340 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_53, 976, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_340)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":993
 *     return True
 * 
 * def parse_datetime_string(date_string, **kwargs):             # <<<<<<<<<<<<<<
 *     if not _does_string_look_like_datetime(date_string):
 *         raise ValueError('Given date string not likely a datetime.')
 */
  __pyx_k_tuple_341 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_341)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_341);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date_string));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 0, ((PyObject *)__pyx_n_s__date_string));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date_string));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kwargs));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 1, ((PyObject *)__pyx_n_s__kwargs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kwargs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kwargs));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 2, ((PyObject *)__pyx_n_s__kwargs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kwargs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 3, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_341));
  __pyx_k_codeobj_342 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_62, 993, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_342)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1000
 *     return dt
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,             # <<<<<<<<<<<<<<
 *                       format=None, utc=None, coerce=False, unit=None):
 *     cdef:
 */
  __pyx_k_tuple_343 = PyTuple_New(19); if (unlikely(!__pyx_k_tuple_343)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_343);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__raise_));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 1, ((PyObject *)__pyx_n_s__raise_));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__raise_));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dayfirst));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 2, ((PyObject *)__pyx_n_s__dayfirst));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dayfirst));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 3, ((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utc));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 4, ((PyObject *)__pyx_n_s__utc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__coerce));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 5, ((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__coerce));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__unit));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 6, ((PyObject *)__pyx_n_s__unit));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__unit));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 10, ((PyObject *)__pyx_n_s__iresult));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iresult));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 11, ((PyObject *)__pyx_n_s__oresult));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oresult));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 12, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utc_convert));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 13, ((PyObject *)__pyx_n_s__utc_convert));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utc_convert));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_integer));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 14, ((PyObject *)__pyx_n_s__seen_integer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_integer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 15, ((PyObject *)__pyx_n_s__seen_datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 16, ((PyObject *)__pyx_n_s___ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___ts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 17, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 18, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_343));
  __pyx_k_codeobj_344 = (PyObject*)__Pyx_PyCode_New(7, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__array_to_datetime, 1000, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_344)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1169
 *         return oresult
 * 
 * def array_to_timedelta64(ndarray[object] values, coerce=False):             # <<<<<<<<<<<<<<
 *     """ convert an ndarray to an array of ints that are timedeltas
 *         force conversion if coerce = True,
 */
  __pyx_k_tuple_345 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_345)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_345);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__coerce));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 1, ((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__coerce));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 4, ((PyObject *)__pyx_n_s__iresult));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iresult));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_345));
  __pyx_k_codeobj_346 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_347, 1169, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_346)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1185
 *     return iresult
 * 
 * def convert_to_timedelta(object ts, object unit='ns', coerce=False):             # <<<<<<<<<<<<<<
 *     return convert_to_timedelta64(ts, unit, coerce)
 * 
 */
  __pyx_k_tuple_348 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_348)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_348);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 0, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__unit));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 1, ((PyObject *)__pyx_n_s__unit));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__unit));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__coerce));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 2, ((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_348));
  __pyx_k_codeobj_349 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_350, 1185, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_349)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1244
 *     return ts.astype('timedelta64[ns]')
 * 
 * def repr_timedelta64(object value, format=None):             # <<<<<<<<<<<<<<
 *    """
 *     provide repr for timedelta64
 */
  __pyx_k_tuple_351 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_351)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_351);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 1, ((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ivalue));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 2, ((PyObject *)__pyx_n_s__ivalue));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ivalue));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__frac));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 3, ((PyObject *)__pyx_n_s__frac));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__frac));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sign));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 4, ((PyObject *)__pyx_n_s__sign));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sign));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__days));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 5, ((PyObject *)__pyx_n_s__days));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 6, ((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hours));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minutes));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 7, ((PyObject *)__pyx_n_s__minutes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minutes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 8, ((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds_pretty));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 9, ((PyObject *)__pyx_n_s__seconds_pretty));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds_pretty));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sp));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 10, ((PyObject *)__pyx_n_s__sp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sign_pretty));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 11, ((PyObject *)__pyx_n_s__sign_pretty));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sign_pretty));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_351));
  __pyx_k_codeobj_352 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__repr_timedelta64, 1244, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_352)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1313
 * 
 * 
 * def array_strptime(ndarray[object] values, object fmt, coerce=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_353 = PyTuple_New(37); if (unlikely(!__pyx_k_tuple_353)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_353);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fmt));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 1, ((PyObject *)__pyx_n_s__fmt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fmt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__coerce));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 2, ((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__coerce));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 5, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 6, ((PyObject *)__pyx_n_s__iresult));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iresult));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 7, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__month));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 8, ((PyObject *)__pyx_n_s__month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__day));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 9, ((PyObject *)__pyx_n_s__day));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minute));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 10, ((PyObject *)__pyx_n_s__minute));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minute));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hour));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 11, ((PyObject *)__pyx_n_s__hour));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hour));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__second));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 12, ((PyObject *)__pyx_n_s__second));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__second));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fraction));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 13, ((PyObject *)__pyx_n_s__fraction));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fraction));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__weekday));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 14, ((PyObject *)__pyx_n_s__weekday));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__weekday));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__julian));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 15, ((PyObject *)__pyx_n_s__julian));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__julian));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 16, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__locale_time));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 17, ((PyObject *)__pyx_n_s__locale_time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__locale_time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__format_regex));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 18, ((PyObject *)__pyx_n_s__format_regex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format_regex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__err));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 19, ((PyObject *)__pyx_n_s__err));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__err));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bad_directive));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 20, ((PyObject *)__pyx_n_s__bad_directive));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bad_directive));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 21, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___parse_code_table));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 22, ((PyObject *)__pyx_n_s___parse_code_table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___parse_code_table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_code));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 23, ((PyObject *)__pyx_n_s__parse_code));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_code));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__found));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 24, ((PyObject *)__pyx_n_s__found));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__found));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 25, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week_of_year));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 26, ((PyObject *)__pyx_n_s__week_of_year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week_of_year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week_of_year_start));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 27, ((PyObject *)__pyx_n_s__week_of_year_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week_of_year_start));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__found_dict));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 28, ((PyObject *)__pyx_n_s__found_dict));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__found_dict));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__group_key));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 29, ((PyObject *)__pyx_n_s__group_key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__group_key));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ampm));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 30, ((PyObject *)__pyx_n_s__ampm));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ampm));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 31, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__found_zone));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 32, ((PyObject *)__pyx_n_s__found_zone));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__found_zone));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 33, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 34, ((PyObject *)__pyx_n_s__tz_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week_starts_Mon));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 35, ((PyObject *)__pyx_n_s__week_starts_Mon));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week_starts_Mon));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime_result));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 36, ((PyObject *)__pyx_n_s__datetime_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_353));
  __pyx_k_codeobj_354 = (PyObject*)__Pyx_PyCode_New(3, 0, 37, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__array_strptime, 1313, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_354)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1599
 *     return <int64_t> (base*m) + <int64_t> (frac*m)
 * 
 * def cast_to_nanoseconds(ndarray arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = arr.size
 */
  __pyx_k_tuple_355 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_355)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_355);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ivalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 3, ((PyObject *)__pyx_n_s__ivalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ivalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 4, ((PyObject *)__pyx_n_s__iresult));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iresult));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__unit));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 5, ((PyObject *)__pyx_n_s__unit));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__unit));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 6, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__shape));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 7, ((PyObject *)__pyx_n_s__shape));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__shape));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_355));
  __pyx_k_codeobj_356 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__cast_to_nanoseconds, 1599, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_356)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1631
 * 
 * 
 * def pydt_to_i8(object pydt):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert to int64 representation compatible with numpy datetime64; converts
 */
  __pyx_k_tuple_357 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_357)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_357);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pydt));
  PyTuple_SET_ITEM(__pyx_k_tuple_357, 0, ((PyObject *)__pyx_n_s__pydt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pydt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_357, 1, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_357));
  __pyx_k_codeobj_358 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__pydt_to_i8, 1631, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_358)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1643
 *     return ts.value
 * 
 * def i8_to_pydt(int64_t i8, object tzinfo = None):             # <<<<<<<<<<<<<<
 *     '''
 *     Inverse of pydt_to_i8
 */
  __pyx_k_tuple_359 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_359)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_359);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_359, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tzinfo));
  PyTuple_SET_ITEM(__pyx_k_tuple_359, 1, ((PyObject *)__pyx_n_s__tzinfo));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzinfo));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_359));
  __pyx_k_codeobj_360 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_359, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__i8_to_pydt, 1643, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_360)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1660
 *     have_pytz = False
 * 
 * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] utc_dates, result, trans, deltas
 */
  __pyx_k_tuple_361 = PyTuple_New(17); if (unlikely(!__pyx_k_tuple_361)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_361);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vals));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 0, ((PyObject *)__pyx_n_s__vals));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vals));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz1));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 1, ((PyObject *)__pyx_n_s__tz1));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz2));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 2, ((PyObject *)__pyx_n_s__tz2));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz2));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utc_dates));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 3, ((PyObject *)__pyx_n_s__utc_dates));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utc_dates));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 5, ((PyObject *)__pyx_n_s__trans));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__deltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 6, ((PyObject *)__pyx_n_s__deltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltas));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 8, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 9, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 10, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 11, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 12, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pytz));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 13, ((PyObject *)__pyx_n_s__pytz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pytz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 14, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__delta));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 15, ((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans_len));
  PyTuple_SET_ITEM(__pyx_k_tuple_361, 16, ((PyObject *)__pyx_n_s__trans_len));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans_len));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_361));
  __pyx_k_codeobj_362 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tz_convert, 1660, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_362)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1738
 *     return result
 * 
 * def tz_convert_single(int64_t val, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] trans, deltas
 */
  __pyx_k_tuple_363 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_363)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_363);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 0, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz1));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 1, ((PyObject *)__pyx_n_s__tz1));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz2));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 2, ((PyObject *)__pyx_n_s__tz2));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz2));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 3, ((PyObject *)__pyx_n_s__trans));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__deltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 4, ((PyObject *)__pyx_n_s__deltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltas));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 5, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 6, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 7, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utc_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 8, ((PyObject *)__pyx_n_s__utc_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utc_date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 9, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pytz));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 10, ((PyObject *)__pyx_n_s__pytz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pytz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 11, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__delta));
  PyTuple_SET_ITEM(__pyx_k_tuple_363, 12, ((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_363));
  __pyx_k_codeobj_364 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tz_convert_single, 1738, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_364)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1788
 * utc_offset_cache = {}
 * 
 * def _get_transitions(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC times of DST transitions
 */
  __pyx_k_tuple_365 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_365)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_365);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_365, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_365, 1, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_365));
  __pyx_k_codeobj_366 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___get_transitions, 1788, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_366)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1812
 *     return trans_cache[tz]
 * 
 * def _get_deltas(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC offsets in microseconds corresponding to DST transitions
 */
  __pyx_k_tuple_367 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_367)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_367);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_367, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__num));
  PyTuple_SET_ITEM(__pyx_k_tuple_367, 1, ((PyObject *)__pyx_n_s__num));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__num));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_367));
  __pyx_k_codeobj_368 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___get_deltas, 1812, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_368)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1837
 *             10**6)
 * 
 * def tot_seconds(td):             # <<<<<<<<<<<<<<
 *     return total_seconds(td)
 * 
 */
  __pyx_k_tuple_369 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_369)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_369);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__td));
  PyTuple_SET_ITEM(__pyx_k_tuple_369, 0, ((PyObject *)__pyx_n_s__td));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__td));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_369));
  __pyx_k_codeobj_370 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tot_seconds, 1837, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_370)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1856
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False):             # <<<<<<<<<<<<<<
 *     """
 *     Localize tzinfo-naive DateRange to given time zone (using pytz). If
 */
  __pyx_k_tuple_371 = PyTuple_New(32); if (unlikely(!__pyx_k_tuple_371)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_371);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vals));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 0, ((PyObject *)__pyx_n_s__vals));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vals));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__infer_dst));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 2, ((PyObject *)__pyx_n_s__infer_dst));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__infer_dst));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 3, ((PyObject *)__pyx_n_s__trans));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__deltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 4, ((PyObject *)__pyx_n_s__deltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltas));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx_shifted));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 5, ((PyObject *)__pyx_n_s__idx_shifted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx_shifted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 7, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 8, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ntrans));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 9, ((PyObject *)__pyx_n_s__ntrans));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ntrans));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 10, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tdata));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 11, ((PyObject *)__pyx_n_s__tdata));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tdata));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 12, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 13, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 14, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 15, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result_a));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 16, ((PyObject *)__pyx_n_s__result_a));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result_a));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result_b));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 17, ((PyObject *)__pyx_n_s__result_b));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result_b));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dst_hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 18, ((PyObject *)__pyx_n_s__dst_hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dst_hours));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 19, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 20, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__delta));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 21, ((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__both_nat));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 22, ((PyObject *)__pyx_n_s__both_nat));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__both_nat));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__both_eq));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 23, ((PyObject *)__pyx_n_s__both_eq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__both_eq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans_idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 24, ((PyObject *)__pyx_n_s__trans_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans_idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stamp));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 25, ((PyObject *)__pyx_n_s__stamp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stamp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__one_diff));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 26, ((PyObject *)__pyx_n_s__one_diff));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__one_diff));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans_grp));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 27, ((PyObject *)__pyx_n_s__trans_grp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans_grp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__grp));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 28, ((PyObject *)__pyx_n_s__grp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__grp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__switch_idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 29, ((PyObject *)__pyx_n_s__switch_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__switch_idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__a_idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 30, ((PyObject *)__pyx_n_s__a_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a_idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__b_idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_371, 31, ((PyObject *)__pyx_n_s__b_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_371));
  __pyx_k_codeobj_372 = (PyObject*)__Pyx_PyCode_New(3, 0, 32, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__tz_localize_to_utc, 1856, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_372)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2028
 * #----------------------------------------------------------------------
 * 
 * def build_field_sarray(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */
  __pyx_k_tuple_373 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_373)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_373);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 0, ((PyObject *)__pyx_n_s__dtindex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dtindex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 2, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__isleap));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 3, ((PyObject *)__pyx_n_s__isleap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isleap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 4, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__years));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 5, ((PyObject *)__pyx_n_s__years));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__years));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__months));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 6, ((PyObject *)__pyx_n_s__months));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__months));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__days));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 7, ((PyObject *)__pyx_n_s__days));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hours));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 8, ((PyObject *)__pyx_n_s__hours));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hours));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minutes));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 9, ((PyObject *)__pyx_n_s__minutes));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minutes));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seconds));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 10, ((PyObject *)__pyx_n_s__seconds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seconds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mus));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 11, ((PyObject *)__pyx_n_s__mus));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mus));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sa_dtype));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 12, ((PyObject *)__pyx_n_s__sa_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sa_dtype));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_373, 13, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_373));
  __pyx_k_codeobj_374 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__build_field_sarray, 2028, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_374)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2070
 *     return out
 * 
 * def get_time_micros(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */
  __pyx_k_tuple_375 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_375)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_375);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_375, 0, ((PyObject *)__pyx_n_s__dtindex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dtindex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_375, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_375, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_375, 3, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__micros));
  PyTuple_SET_ITEM(__pyx_k_tuple_375, 4, ((PyObject *)__pyx_n_s__micros));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__micros));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_375));
  __pyx_k_codeobj_376 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__get_time_micros, 2070, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_376)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2089
 * 
 * @cython.wraparound(False)
 * def get_date_field(ndarray[int64_t] dtindex, object field):             # <<<<<<<<<<<<<<
 *     '''
 *     Given a int64-based datetime index, extract the year, month, etc.,
 */
  __pyx_k_tuple_377 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_377)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_377);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 0, ((PyObject *)__pyx_n_s__dtindex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dtindex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__field));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 1, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 2, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 4, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 5, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___month_offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 6, ((PyObject *)__pyx_n_s___month_offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___month_offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__isleap));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 7, ((PyObject *)__pyx_n_s__isleap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isleap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__isleap_prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 8, ((PyObject *)__pyx_n_s__isleap_prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isleap_prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 9, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mo_off));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 10, ((PyObject *)__pyx_n_s__mo_off));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mo_off));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__doy));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 11, ((PyObject *)__pyx_n_s__doy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__doy));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dow));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 12, ((PyObject *)__pyx_n_s__dow));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dow));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__woy));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 13, ((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_377));
  __pyx_k_codeobj_378 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__get_date_field, 2089, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_378)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2239
 * 
 * 
 * def date_normalize(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
  __pyx_k_tuple_379 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_379)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_379);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stamps));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 0, ((PyObject *)__pyx_n_s__stamps));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stamps));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 4, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tso));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 5, ((PyObject *)__pyx_n_s__tso));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tso));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_379));
  __pyx_k_codeobj_380 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__date_normalize, 2239, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_380)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2334
 * 
 * 
 * def dates_normalized(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
  __pyx_k_tuple_381 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_381)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_381);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stamps));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 0, ((PyObject *)__pyx_n_s__stamps));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stamps));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 4, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 5, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__trans));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 6, ((PyObject *)__pyx_n_s__trans));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__deltas));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 7, ((PyObject *)__pyx_n_s__deltas));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__deltas));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 8, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inf));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 9, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_381));
  __pyx_k_codeobj_382 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__dates_normalized, 2334, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_382)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2372
 * #----------------------------------------------------------------------
 * 
 * def isleapyear(int64_t year):             # <<<<<<<<<<<<<<
 *     return is_leapyear(year)
 * 
 */
  __pyx_k_tuple_383 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_383)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_383);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_383, 0, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_383, 1, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_383));
  __pyx_k_codeobj_384 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__isleapyear, 2372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_384)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2375
 *     return is_leapyear(year)
 * 
 * def monthrange(int64_t year, int64_t month):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t days
 */
  __pyx_k_tuple_385 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_385)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_385);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_385, 0, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__month));
  PyTuple_SET_ITEM(__pyx_k_tuple_385, 1, ((PyObject *)__pyx_n_s__month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__days));
  PyTuple_SET_ITEM(__pyx_k_tuple_385, 2, ((PyObject *)__pyx_n_s__days));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__day_of_week));
  PyTuple_SET_ITEM(__pyx_k_tuple_385, 3, ((PyObject *)__pyx_n_s__day_of_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day_of_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_385));
  __pyx_k_codeobj_386 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__monthrange, 2375, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_386)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2554
 *     return period_ord_w_mult * mult + 1;
 * 
 * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None):             # <<<<<<<<<<<<<<
 *     """
 *     Convert array of datetime64 values (passed in as 'i8' dtype) to a set of
 */
  __pyx_k_tuple_387 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_387)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_387);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtarr));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 0, ((PyObject *)__pyx_n_s__dtarr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dtarr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 1, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 2, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 3, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 5, ((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dts));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 6, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_387));
  __pyx_k_codeobj_388 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_389, 2554, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_388)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2577
 *     return out
 * 
 * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq):             # <<<<<<<<<<<<<<
 *     """
 *     Convert array to datetime64 values from a set of ordinals corresponding to
 */
  __pyx_k_tuple_390 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_390)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_390);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__periodarr));
  PyTuple_SET_ITEM(__pyx_k_tuple_390, 0, ((PyObject *)__pyx_n_s__periodarr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__periodarr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_390, 1, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_390, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_390, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
  PyTuple_SET_ITEM(__pyx_k_tuple_390, 4, ((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_390));
  __pyx_k_codeobj_391 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_392, 2577, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_391)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2617
 *     return retval
 * 
 * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end):             # <<<<<<<<<<<<<<
 *     """
 *     Convert int64-array of period ordinals from one frequency to another, and
 */
  __pyx_k_tuple_393 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_393)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_393);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq1));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 1, ((PyObject *)__pyx_n_s__freq1));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq2));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 2, ((PyObject *)__pyx_n_s__freq2));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq2));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__end));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 3, ((PyObject *)__pyx_n_s__end));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 7, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__finfo));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 8, ((PyObject *)__pyx_n_s__finfo));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__finfo));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ordinal));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 10, ((PyObject *)__pyx_n_s__ordinal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ordinal));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__relation));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 11, ((PyObject *)__pyx_n_s__relation));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__relation));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_393));
  __pyx_k_codeobj_394 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__period_asfreq_arr, 2617, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_394)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2649
 *     return result
 * 
 * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t ordinal
 */
  __pyx_k_tuple_395 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_395)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_395);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 0, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 1, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 2, ((PyObject *)__pyx_n_s__d));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__h));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 3, ((PyObject *)__pyx_n_s__h));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__h));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__min));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 4, ((PyObject *)__pyx_n_s__min));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__min));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 5, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__us));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 6, ((PyObject *)__pyx_n_s__us));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__us));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ps));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 7, ((PyObject *)__pyx_n_s__ps));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ps));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 8, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ordinal));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 9, ((PyObject *)__pyx_n_s__ordinal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ordinal));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_395));
  __pyx_k_codeobj_396 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_395, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__period_ordinal, 2649, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_396)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2676
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 * 
 * def period_format(int64_t value, int freq, object fmt=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int freq_group
 */
  __pyx_k_tuple_397 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_397)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_397);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 0, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 1, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fmt));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 2, ((PyObject *)__pyx_n_s__fmt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fmt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq_group));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 3, ((PyObject *)__pyx_n_s__freq_group));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq_group));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 4, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 5, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_397));
  __pyx_k_codeobj_398 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__period_format, 2676, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_398)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2714
 * 
 * 
 * cdef list extra_fmts = [(b"%q", b"^`AB`^"),             # <<<<<<<<<<<<<<
 *                         (b"%f", b"^`CD`^"),
 *                         (b"%F", b"^`EF`^"),
 */
  __pyx_k_tuple_401 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_401)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_401);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_399));
  PyTuple_SET_ITEM(__pyx_k_tuple_401, 0, ((PyObject *)__pyx_kp_b_399));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_399));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_400));
  PyTuple_SET_ITEM(__pyx_k_tuple_401, 1, ((PyObject *)__pyx_kp_b_400));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_400));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_401));

  /* "pandas/tslib.pyx":2715
 * 
 * cdef list extra_fmts = [(b"%q", b"^`AB`^"),
 *                         (b"%f", b"^`CD`^"),             # <<<<<<<<<<<<<<
 *                         (b"%F", b"^`EF`^"),
 *                         (b"%l", b"^`GH`^"),
 */
  __pyx_k_tuple_404 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_404)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_404);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_402));
  PyTuple_SET_ITEM(__pyx_k_tuple_404, 0, ((PyObject *)__pyx_kp_b_402));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_402));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_403));
  PyTuple_SET_ITEM(__pyx_k_tuple_404, 1, ((PyObject *)__pyx_kp_b_403));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_403));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_404));

  /* "pandas/tslib.pyx":2716
 * cdef list extra_fmts = [(b"%q", b"^`AB`^"),
 *                         (b"%f", b"^`CD`^"),
 *                         (b"%F", b"^`EF`^"),             # <<<<<<<<<<<<<<
 *                         (b"%l", b"^`GH`^"),
 *                         (b"%u", b"^`IJ`^"),
 */
  __pyx_k_tuple_407 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_407)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_407);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_405));
  PyTuple_SET_ITEM(__pyx_k_tuple_407, 0, ((PyObject *)__pyx_kp_b_405));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_405));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_406));
  PyTuple_SET_ITEM(__pyx_k_tuple_407, 1, ((PyObject *)__pyx_kp_b_406));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_406));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_407));

  /* "pandas/tslib.pyx":2717
 *                         (b"%f", b"^`CD`^"),
 *                         (b"%F", b"^`EF`^"),
 *                         (b"%l", b"^`GH`^"),             # <<<<<<<<<<<<<<
 *                         (b"%u", b"^`IJ`^"),
 *                         (b"%n", b"^`KL`^")]
 */
  __pyx_k_tuple_410 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_410)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_410);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_408));
  PyTuple_SET_ITEM(__pyx_k_tuple_410, 0, ((PyObject *)__pyx_kp_b_408));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_408));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_409));
  PyTuple_SET_ITEM(__pyx_k_tuple_410, 1, ((PyObject *)__pyx_kp_b_409));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_409));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_410));

  /* "pandas/tslib.pyx":2718
 *                         (b"%F", b"^`EF`^"),
 *                         (b"%l", b"^`GH`^"),
 *                         (b"%u", b"^`IJ`^"),             # <<<<<<<<<<<<<<
 *                         (b"%n", b"^`KL`^")]
 * 
 */
  __pyx_k_tuple_413 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_413)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_413);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_411));
  PyTuple_SET_ITEM(__pyx_k_tuple_413, 0, ((PyObject *)__pyx_kp_b_411));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_411));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_412));
  PyTuple_SET_ITEM(__pyx_k_tuple_413, 1, ((PyObject *)__pyx_kp_b_412));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_412));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_413));

  /* "pandas/tslib.pyx":2719
 *                         (b"%l", b"^`GH`^"),
 *                         (b"%u", b"^`IJ`^"),
 *                         (b"%n", b"^`KL`^")]             # <<<<<<<<<<<<<<
 * 
 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"]
 */
  __pyx_k_tuple_416 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_416)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_416);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_414));
  PyTuple_SET_ITEM(__pyx_k_tuple_416, 0, ((PyObject *)__pyx_kp_b_414));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_414));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_415));
  PyTuple_SET_ITEM(__pyx_k_tuple_416, 1, ((PyObject *)__pyx_kp_b_415));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_415));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_416));

  /* "pandas/tslib.pyx":2779
 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN
 * 
 * def get_period_field(int code, int64_t value, int freq):             # <<<<<<<<<<<<<<
 *     cdef accessor f = _get_accessor_func(code)
 *     if f is NULL:
 */
  __pyx_k_tuple_417 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_417)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_417);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__code));
  PyTuple_SET_ITEM(__pyx_k_tuple_417, 0, ((PyObject *)__pyx_n_s__code));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__code));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_417, 1, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_417, 2, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_417, 3, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_417));
  __pyx_k_codeobj_418 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_417, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__get_period_field, 2779, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_418)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2785
 *     return f(value, freq)
 * 
 * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */
  __pyx_k_tuple_419 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_419)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_419);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__code));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 0, ((PyObject *)__pyx_n_s__code));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__code));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 1, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 2, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sz));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 4, ((PyObject *)__pyx_n_s__sz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 5, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 6, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_419));
  __pyx_k_codeobj_420 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_419, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_421, 2785, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_420)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2831
 * 
 * 
 * def extract_ordinals(ndarray[object] values, freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_422 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_422)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_422);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_422, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freq));
  PyTuple_SET_ITEM(__pyx_k_tuple_422, 1, ((PyObject *)__pyx_n_s__freq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_422, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_422, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ordinals));
  PyTuple_SET_ITEM(__pyx_k_tuple_422, 4, ((PyObject *)__pyx_n_s__ordinals));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ordinals));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__p));
  PyTuple_SET_ITEM(__pyx_k_tuple_422, 5, ((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_422));
  __pyx_k_codeobj_423 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__extract_ordinals, 2831, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_423)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2979
 * __all__ = []
 * 
 * def _getlang():             # <<<<<<<<<<<<<<
 *     # Figure out what the current language is set to.
 *     return locale.getlocale(locale.LC_TIME)
 */
  __pyx_k_codeobj_425 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s___getlang, 2979, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_425)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3002
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Set all attributes.
 * 
 */
  __pyx_k_tuple_426 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_426)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_426);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_426, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_426));
  __pyx_k_codeobj_427 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____init__, 3002, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_427)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3031
 *             raise ValueError("locale changed during initialization")
 * 
 *     def __pad(self, seq, front):             # <<<<<<<<<<<<<<
 *         # Add '' to seq to either the front (is True), else the back.
 *         seq = list(seq)
 */
  __pyx_k_tuple_428 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_428)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_428);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_428, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seq));
  PyTuple_SET_ITEM(__pyx_k_tuple_428, 1, ((PyObject *)__pyx_n_s__seq));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seq));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__front));
  PyTuple_SET_ITEM(__pyx_k_tuple_428, 2, ((PyObject *)__pyx_n_s__front));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__front));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_428));
  __pyx_k_codeobj_429 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____pad, 3031, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_429)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3040
 *         return seq
 * 
 *     def __calc_weekday(self):             # <<<<<<<<<<<<<<
 *         # Set self.a_weekday and self.f_weekday using the calendar
 *         # module.
 */
  __pyx_k_tuple_430 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_430)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_430);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__a_weekday));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 1, ((PyObject *)__pyx_n_s__a_weekday));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a_weekday));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f_weekday));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 2, ((PyObject *)__pyx_n_s__f_weekday));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f_weekday));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_430));
  __pyx_k_codeobj_431 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____calc_weekday, 3040, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_431)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3048
 *         self.f_weekday = f_weekday
 * 
 *     def __calc_month(self):             # <<<<<<<<<<<<<<
 *         # Set self.f_month and self.a_month using the calendar module.
 *         a_month = [calendar.month_abbr[i].lower() for i in range(13)]
 */
  __pyx_k_tuple_432 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_432)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_432);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_432, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__a_month));
  PyTuple_SET_ITEM(__pyx_k_tuple_432, 1, ((PyObject *)__pyx_n_s__a_month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a_month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f_month));
  PyTuple_SET_ITEM(__pyx_k_tuple_432, 2, ((PyObject *)__pyx_n_s__f_month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f_month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_432, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_432));
  __pyx_k_codeobj_433 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____calc_month, 3048, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_433)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3055
 *         self.f_month = f_month
 * 
 *     def __calc_am_pm(self):             # <<<<<<<<<<<<<<
 *         # Set self.am_pm by using time.strftime().
 * 
 */
  __pyx_k_tuple_434 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_434)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_434);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_434, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__am_pm));
  PyTuple_SET_ITEM(__pyx_k_tuple_434, 1, ((PyObject *)__pyx_n_s__am_pm));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__am_pm));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hour));
  PyTuple_SET_ITEM(__pyx_k_tuple_434, 2, ((PyObject *)__pyx_n_s__hour));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hour));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__time_tuple));
  PyTuple_SET_ITEM(__pyx_k_tuple_434, 3, ((PyObject *)__pyx_n_s__time_tuple));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time_tuple));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_434));
  __pyx_k_codeobj_435 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____calc_am_pm, 3055, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_435)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3067
 *         self.am_pm = am_pm
 * 
 *     def __calc_date_time(self):             # <<<<<<<<<<<<<<
 *         # Set self.date_time, self.date, & self.time by using
 *         # time.strftime().
 */
  __pyx_k_tuple_436 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_436)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_436);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__time_tuple));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 1, ((PyObject *)__pyx_n_s__time_tuple));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time_tuple));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date_time));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 2, ((PyObject *)__pyx_n_s__date_time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date_time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__replacement_pairs));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 3, ((PyObject *)__pyx_n_s__replacement_pairs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__replacement_pairs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 4, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__directive));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 5, ((PyObject *)__pyx_n_s__directive));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__directive));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__current_format));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 6, ((PyObject *)__pyx_n_s__current_format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__current_format));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__old));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 7, ((PyObject *)__pyx_n_s__old));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__old));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__new));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 8, ((PyObject *)__pyx_n_s__new));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__new));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__U_W));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 9, ((PyObject *)__pyx_n_s__U_W));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__U_W));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 10, ((PyObject *)__pyx_n_s__tz_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 11, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_436));
  __pyx_k_codeobj_437 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____calc_date_time, 3067, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_437)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3112
 *         self.LC_time = date_time[2]
 * 
 *     def __calc_timezone(self):             # <<<<<<<<<<<<<<
 *         # Set self.timezone by using time.tzname.
 *         # Do not worry about possibility of time.tzname[0] == timetzname[1]
 */
  __pyx_k_tuple_438 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_438)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_438);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_438, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__no_saving));
  PyTuple_SET_ITEM(__pyx_k_tuple_438, 1, ((PyObject *)__pyx_n_s__no_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__no_saving));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__has_saving));
  PyTuple_SET_ITEM(__pyx_k_tuple_438, 2, ((PyObject *)__pyx_n_s__has_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__has_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_438));
  __pyx_k_codeobj_439 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____calc_timezone, 3112, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_439)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3131
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */
  __pyx_k_tuple_441 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_441)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_441);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_441, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__locale_time));
  PyTuple_SET_ITEM(__pyx_k_tuple_441, 1, ((PyObject *)__pyx_n_s__locale_time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__locale_time));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__base));
  PyTuple_SET_ITEM(__pyx_k_tuple_441, 2, ((PyObject *)__pyx_n_s__base));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
  PyTuple_SET_ITEM(__pyx_k_tuple_441, 3, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
  PyTuple_SET_ITEM(__pyx_k_tuple_441, 4, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_441));
  __pyx_k_codeobj_442 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____init__, 3131, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_442)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_443 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_443)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_443);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_443, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_443));

  /* "pandas/tslib.pyx":3173
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))
 * 
 *     def __seqToRE(self, to_convert, directive):             # <<<<<<<<<<<<<<
 *         """Convert a list to a regex string for matching a directive.
 * 
 */
  __pyx_k_tuple_444 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_444)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_444);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__to_convert));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 1, ((PyObject *)__pyx_n_s__to_convert));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__to_convert));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__directive));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 2, ((PyObject *)__pyx_n_s__directive));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__directive));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 3, ((PyObject *)__pyx_n_s__value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__regex));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 4, ((PyObject *)__pyx_n_s__regex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 5, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 6, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_444));
  __pyx_k_codeobj_445 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s____seqToRE, 3173, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_445)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3192
 *         return '%s)' % regex
 * 
 *     def pattern(self, format):             # <<<<<<<<<<<<<<
 *         """Return regex pattern for the format string.
 * 
 */
  __pyx_k_tuple_447 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_447)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_447);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_447, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
  PyTuple_SET_ITEM(__pyx_k_tuple_447, 1, ((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__processed_format));
  PyTuple_SET_ITEM(__pyx_k_tuple_447, 2, ((PyObject *)__pyx_n_s__processed_format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__processed_format));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__regex_chars));
  PyTuple_SET_ITEM(__pyx_k_tuple_447, 3, ((PyObject *)__pyx_n_s__regex_chars));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regex_chars));
  __Pyx_INCREF(((PyObject *)__pyx_n_s_446));
  PyTuple_SET_ITEM(__pyx_k_tuple_447, 4, ((PyObject *)__pyx_n_s_446));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s_446));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__directive_index));
  PyTuple_SET_ITEM(__pyx_k_tuple_447, 5, ((PyObject *)__pyx_n_s__directive_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__directive_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_447));
  __pyx_k_codeobj_448 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_447, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__pattern, 3192, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_448)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3215
 *         return "%s%s" % (processed_format, format)
 * 
 *     def compile(self, format):             # <<<<<<<<<<<<<<
 *         """Return a compiled re object for the format string."""
 *         return re_compile(self.pattern(format), IGNORECASE)
 */
  __pyx_k_tuple_449 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_449)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_449);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_449, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
  PyTuple_SET_ITEM(__pyx_k_tuple_449, 1, ((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_449));
  __pyx_k_codeobj_450 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_449, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s__compile, 3215, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_450)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3226
 * _regex_cache = {}
 * 
 * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon):             # <<<<<<<<<<<<<<
 *     """Calculate the Julian day based on the year, week of the year, and day of
 *     the week, with week_start_day representing whether the week of the year
 */
  __pyx_k_tuple_452 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_452)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_452);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 0, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week_of_year));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 1, ((PyObject *)__pyx_n_s__week_of_year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week_of_year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__day_of_week));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 2, ((PyObject *)__pyx_n_s__day_of_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day_of_week));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week_starts_Mon));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 3, ((PyObject *)__pyx_n_s__week_starts_Mon));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week_starts_Mon));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__first_weekday));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 4, ((PyObject *)__pyx_n_s__first_weekday));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__first_weekday));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week_0_length));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 5, ((PyObject *)__pyx_n_s__week_0_length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week_0_length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__days_to_week));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 6, ((PyObject *)__pyx_n_s__days_to_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days_to_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_452));
  __pyx_k_codeobj_453 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_247, __pyx_n_s_92, 3226, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_453)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1L = PyLong_FromString((char *)"1", 0, 0); if (unlikely(!__pyx_int_1L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_01 = PyInt_FromLong(01); if (unlikely(!__pyx_int_01)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_121 = PyInt_FromLong(121); if (unlikely(!__pyx_int_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_151 = PyInt_FromLong(151); if (unlikely(!__pyx_int_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_152 = PyInt_FromLong(152); if (unlikely(!__pyx_int_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_181 = PyInt_FromLong(181); if (unlikely(!__pyx_int_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_182 = PyInt_FromLong(182); if (unlikely(!__pyx_int_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_212 = PyInt_FromLong(212); if (unlikely(!__pyx_int_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_213 = PyInt_FromLong(213); if (unlikely(!__pyx_int_213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_243 = PyInt_FromLong(243); if (unlikely(!__pyx_int_243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_244 = PyInt_FromLong(244); if (unlikely(!__pyx_int_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_273 = PyInt_FromLong(273); if (unlikely(!__pyx_int_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_274 = PyInt_FromLong(274); if (unlikely(!__pyx_int_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_304 = PyInt_FromLong(304); if (unlikely(!__pyx_int_304)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_305 = PyInt_FromLong(305); if (unlikely(!__pyx_int_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_334 = PyInt_FromLong(334); if (unlikely(!__pyx_int_334)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_335 = PyInt_FromLong(335); if (unlikely(!__pyx_int_335)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_365 = PyInt_FromLong(365); if (unlikely(!__pyx_int_365)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_366 = PyInt_FromLong(366); if (unlikely(!__pyx_int_366)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1000L = PyLong_FromString((char *)"1000", 0, 0); if (unlikely(!__pyx_int_1000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1999 = PyInt_FromLong(1999); if (unlikely(!__pyx_int_1999)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_6000 = PyInt_FromLong(6000); if (unlikely(!__pyx_int_6000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_86400 = PyInt_FromLong(86400); if (unlikely(!__pyx_int_86400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1000000 = PyInt_FromLong(1000000); if (unlikely(!__pyx_int_1000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1000000L = PyLong_FromString((char *)"1000000", 0, 0); if (unlikely(!__pyx_int_1000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1000000000 = PyInt_FromLong(1000000000); if (unlikely(!__pyx_int_1000000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1000000000L = PyLong_FromString((char *)"1000000000", 0, 0); if (unlikely(!__pyx_int_1000000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_86400000000000L = PyLong_FromString((char *)"86400000000000", 0, 0); if (unlikely(!__pyx_int_86400000000000L)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC inittslib(void); /*proto*/
PyMODINIT_FUNC inittslib(void)
#else
PyMODINIT_FUNC PyInit_tslib(void); /*proto*/
PyMODINIT_FUNC PyInit_tslib(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_tslib(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("tslib"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "pandas.tslib")) {
      if (unlikely(PyDict_SetItemString(modules, "pandas.tslib", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_pandas__tslib) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  __pyx_v_6pandas_5tslib__NDIM_STRING = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pandas_5tslib_extra_fmts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_6pandas_5tslib_str_extra_fmts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("convert_to_tsobject", (void (*)(void))__pyx_f_6pandas_5tslib_convert_to_tsobject, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("convert_to_timedelta64", (void (*)(void))__pyx_f_6pandas_5tslib_convert_to_timedelta64, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Type init code ---*/
  __pyx_ptype_8datetime_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_8datetime_datetime)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_6pandas_5tslib__Timestamp = &__pyx_vtable_6pandas_5tslib__Timestamp;
  __pyx_vtable_6pandas_5tslib__Timestamp._compare_outside_nanorange = (int (*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyDateTime_DateTime *, int))__pyx_f_6pandas_5tslib_10_Timestamp__compare_outside_nanorange;
  __pyx_vtable_6pandas_5tslib__Timestamp._assert_tzawareness_compat = (int (*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *))__pyx_f_6pandas_5tslib_10_Timestamp__assert_tzawareness_compat;
  __pyx_vtable_6pandas_5tslib__Timestamp.to_datetime = (PyDateTime_DateTime *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp_to_datetime;
  __pyx_vtable_6pandas_5tslib__Timestamp._get_field = (PyObject *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp__get_field;
  __pyx_type_6pandas_5tslib__Timestamp.tp_base = __pyx_ptype_8datetime_datetime;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_5tslib__Timestamp.tp_dict, __pyx_vtabptr_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "_Timestamp", (PyObject *)&__pyx_type_6pandas_5tslib__Timestamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib__Timestamp = &__pyx_type_6pandas_5tslib__Timestamp;
  __pyx_vtabptr_6pandas_5tslib__NaT = &__pyx_vtable_6pandas_5tslib__NaT;
  __pyx_vtable_6pandas_5tslib__NaT.__pyx_base = *__pyx_vtabptr_6pandas_5tslib__Timestamp;
  __pyx_type_6pandas_5tslib__NaT.tp_base = __pyx_ptype_6pandas_5tslib__Timestamp;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_5tslib__NaT.tp_dict, __pyx_vtabptr_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "_NaT", (PyObject *)&__pyx_type_6pandas_5tslib__NaT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib__NaT = &__pyx_type_6pandas_5tslib__NaT;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib__TSObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "_TSObject", (PyObject *)&__pyx_type_6pandas_5tslib__TSObject) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib__TSObject = &__pyx_type_6pandas_5tslib__TSObject;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct____init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib___pyx_scope_struct____init__ = &__pyx_type_6pandas_5tslib___pyx_scope_struct____init__;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib___pyx_scope_struct_1_genexpr = &__pyx_type_6pandas_5tslib___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib___pyx_scope_struct_2___seqToRE = &__pyx_type_6pandas_5tslib___pyx_scope_struct_2___seqToRE;
  if (PyType_Ready(&__pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_5tslib___pyx_scope_struct_3_genexpr = &__pyx_type_6pandas_5tslib___pyx_scope_struct_3_genexpr;
  /*--- Type import code ---*/
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_8datetime_date = __Pyx_ImportType("datetime", "date", sizeof(PyDateTime_Date), 0); if (unlikely(!__pyx_ptype_8datetime_date)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_8datetime_timedelta = __Pyx_ImportType("datetime", "timedelta", sizeof(PyDateTime_Delta), 0); if (unlikely(!__pyx_ptype_8datetime_timedelta)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "pandas/tslib.pyx":6
 * from numpy cimport (int32_t, int64_t, import_array, ndarray,
 *                     NPY_INT64, NPY_DATETIME, NPY_TIMEDELTA)
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * from cpython cimport (
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":35
 * cimport cython
 * 
 * from datetime import timedelta, datetime             # <<<<<<<<<<<<<<
 * from datetime import time as datetime_time
 * from pandas.compat import parse_date
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__timedelta));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__timedelta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__timedelta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":36
 * 
 * from datetime import timedelta, datetime
 * from datetime import time as datetime_time             # <<<<<<<<<<<<<<
 * from pandas.compat import parse_date
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__time));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__time));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__time);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__time);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__datetime_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":37
 * from datetime import timedelta, datetime
 * from datetime import time as datetime_time
 * from pandas.compat import parse_date             # <<<<<<<<<<<<<<
 * 
 * from sys import version_info
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_238), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__parse_date);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__parse_date);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parse_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":39
 * from pandas.compat import parse_date
 * 
 * from sys import version_info             # <<<<<<<<<<<<<<
 * 
 * # numpy compat
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__version_info));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__version_info));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__version_info));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__version_info);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__version_info);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__version_info, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":42
 * 
 * # numpy compat
 * from distutils.version import LooseVersion             # <<<<<<<<<<<<<<
 * _np_version = np.version.short_version
 * _np_version_under1p6 = LooseVersion(_np_version) < '1.6'
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__LooseVersion));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__LooseVersion));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LooseVersion));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_239), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__LooseVersion);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__LooseVersion);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__LooseVersion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":43
 * # numpy compat
 * from distutils.version import LooseVersion
 * _np_version = np.version.short_version             # <<<<<<<<<<<<<<
 * _np_version_under1p6 = LooseVersion(_np_version) < '1.6'
 * _np_version_under1p7 = LooseVersion(_np_version) < '1.7'
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__short_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___np_version, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":44
 * from distutils.version import LooseVersion
 * _np_version = np.version.short_version
 * _np_version_under1p6 = LooseVersion(_np_version) < '1.6'             # <<<<<<<<<<<<<<
 * _np_version_under1p7 = LooseVersion(_np_version) < '1.7'
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___np_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_240), Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_241, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":45
 * _np_version = np.version.short_version
 * _np_version_under1p6 = LooseVersion(_np_version) < '1.6'
 * _np_version_under1p7 = LooseVersion(_np_version) < '1.7'             # <<<<<<<<<<<<<<
 * 
 * # GH3363
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__LooseVersion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___np_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_s_242), Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_72, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":48
 * 
 * # GH3363
 * cdef bint PY2 = version_info[0] == 2             # <<<<<<<<<<<<<<
 * 
 * # initialize numpy
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_6pandas_5tslib_PY2 = __pyx_t_4;

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

  /* "pandas/tslib.pyx":55
 * 
 * # import datetime C API
 * PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # in numpy 1.7, will prob need the following:
 */
  PyDateTime_IMPORT;

  /* "pandas/tslib.pyx":60
 * # numpy_pydatetime_import
 * 
 * cdef int64_t NPY_NAT = util.get_nat()             # <<<<<<<<<<<<<<
 * 
 * # < numpy 1.7 compat for NaT
 */
  __pyx_v_6pandas_5tslib_NPY_NAT = get_nat();

  /* "pandas/tslib.pyx":63
 * 
 * # < numpy 1.7 compat for NaT
 * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item()             # <<<<<<<<<<<<<<
 * 
 * # numpy actual nat object
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_243), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__item); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__compat_NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":66
 * 
 * # numpy actual nat object
 * np_NaT = np.datetime64('NaT',dtype='M8')             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__M8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_244), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np_NaT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":68
 * np_NaT = np.datetime64('NaT',dtype='M8')
 * 
 * try:             # <<<<<<<<<<<<<<
 *     basestring
 * except NameError: # py3
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "pandas/tslib.pyx":69
 * 
 * try:
 *     basestring             # <<<<<<<<<<<<<<
 * except NameError: # py3
 *     basestring = str
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__basestring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":70
 * try:
 *     basestring
 * except NameError: # py3             # <<<<<<<<<<<<<<
 *     basestring = str
 * 
 */
    __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_NameError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);

      /* "pandas/tslib.pyx":71
 *     basestring
 * except NameError: # py3
 *     basestring = str             # <<<<<<<<<<<<<<
 * 
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):
 */
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__basestring, ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L3_exception_handled;
    }
    __pyx_L4_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L9_try_end:;
  }

  /* "pandas/tslib.pyx":73
 *     basestring = str
 * 
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_1ints_to_pydatetime, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ints_to_pydatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":126
 *     return result
 * 
 * from dateutil.tz import tzlocal             # <<<<<<<<<<<<<<
 * 
 * def _is_tzlocal(tz):
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tzlocal));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__tzlocal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzlocal));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_249), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__tzlocal);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__tzlocal);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tzlocal, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":128
 * from dateutil.tz import tzlocal
 * 
 * def _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *     return isinstance(tz, tzlocal)
 * 
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_3_is_tzlocal, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___is_tzlocal, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":131
 *     return isinstance(tz, tzlocal)
 * 
 * def _is_fixed_offset(tz):             # <<<<<<<<<<<<<<
 *     try:
 *         tz._transition_info
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_5_is_fixed_offset, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___is_fixed_offset, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":138
 *         return True
 * 
 * _zero_time = datetime_time(0, 0)             # <<<<<<<<<<<<<<
 * 
 * # Python front end to C extension type _Timestamp
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__datetime_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_254), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___zero_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":142
 * # Python front end to C extension type _Timestamp
 * # This serves as the box for datetime64
 * class Timestamp(_Timestamp):             # <<<<<<<<<<<<<<
 *     """TimeStamp is the pandas equivalent of python's Datetime
 *     and is interchangable with it in most cases. It's the type used
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "pandas/tslib.pyx":150
 * 
 *     @classmethod
 *     def fromordinal(cls, ordinal, offset=None, tz=None):             # <<<<<<<<<<<<<<
 *         """ passed an ordinal, translate and convert to a ts
 *             note: by definition there cannot be any tz info on the ordinal itself """
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_1fromordinal, __Pyx_CYFUNCTION_CLASSMETHOD, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_256)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_257));
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fromordinal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":156
 * 
 *     @classmethod
 *     def now(cls, tz=None):             # <<<<<<<<<<<<<<
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_3now, __Pyx_CYFUNCTION_CLASSMETHOD, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_259)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_260));
  __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__now, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":163
 * 
 *     @classmethod
 *     def today(cls):             # <<<<<<<<<<<<<<
 *         """ compat today with datetime """
 *         return cls(datetime.today())
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_5today, __Pyx_CYFUNCTION_CLASSMETHOD, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_262)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__today, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":168
 * 
 *     @classmethod
 *     def utcnow(cls):             # <<<<<<<<<<<<<<
 *         return cls.now('UTC')
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow, __Pyx_CYFUNCTION_CLASSMETHOD, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_264)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__utcnow, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":171
 *         return cls.now('UTC')
 * 
 *     def __new__(cls, object ts_input, object offset=None, tz=None, unit=None):             # <<<<<<<<<<<<<<
 *         cdef _TSObject ts
 *         cdef _Timestamp ts_base
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_9__new__, __Pyx_CYFUNCTION_STATICMETHOD, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_266)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_267));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____new__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":198
 *         return ts_base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         result = self._repr_base
 *         zone = None
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_269)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____repr__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":221
 * 
 *     @property
 *     def _date_repr(self):             # <<<<<<<<<<<<<<
 *         # Ideal here would be self.strftime("%Y-%m-%d"), but
 *         # the datetime strftime() methods require year >= 1900
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_13_date_repr, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_271)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___date_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":227
 * 
 *     @property
 *     def _time_repr(self):             # <<<<<<<<<<<<<<
 *         result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_15_time_repr, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_273)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___time_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":239
 * 
 *     @property
 *     def _repr_base(self):             # <<<<<<<<<<<<<<
 *         return '%s %s' % (self._date_repr, self._time_repr)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_17_repr_base, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_275)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___repr_base, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":243
 * 
 *     @property
 *     def tz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for tzinfo
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_19tz, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_277)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__tz, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":250
 * 
 *     @property
 *     def freq(self):             # <<<<<<<<<<<<<<
 *         return self.offset
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_21freq, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_279)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__freq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":253
 *         return self.offset
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.value = state[0]
 *         self.offset = state[1]
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_23__setstate__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_281)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____setstate__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":258
 *         self.tzinfo = state[2]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         object_state = self.value, self.offset, self.tzinfo
 *         return (Timestamp, object_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_25__reduce__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_283)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____reduce__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":262
 *         return (Timestamp, object_state)
 * 
 *     def to_period(self, freq=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return an period of which this timestamp is an observation.
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_27to_period, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_285)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_286));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__to_period, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":274
 * 
 *     @property
 *     def dayofweek(self):             # <<<<<<<<<<<<<<
 *         return self.weekday()
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_288)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__dayofweek, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":278
 * 
 *     @property
 *     def dayofyear(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('doy')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_31dayofyear, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_290)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__dayofyear, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":282
 * 
 *     @property
 *     def week(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('woy')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_33week, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_292)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__week, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":285
 *         return self._get_field('woy')
 * 
 *     weekofyear = week             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_n_s__week);
  if (unlikely(!__pyx_t_3)) {
    PyErr_Clear();
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__week);
  }
  if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__weekofyear, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":288
 * 
 *     @property
 *     def quarter(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('q')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_35quarter, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_294)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__quarter, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":292
 * 
 *     @property
 *     def freqstr(self):             # <<<<<<<<<<<<<<
 *         return getattr(self.offset, 'freqstr', self.offset)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_37freqstr, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_296)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__freqstr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":296
 * 
 *     @property
 *     def asm8(self):             # <<<<<<<<<<<<<<
 *         return np.int64(self.value).view('M8[ns]')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_39asm8, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_298)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__asm8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":299
 *         return np.int64(self.value).view('M8[ns]')
 * 
 *     def tz_localize(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert naive Timestamp to local time zone
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_41tz_localize, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_300)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__tz_localize, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":318
 *                             'tz_convert for conversions')
 * 
 *     def tz_convert(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Timestamp to another time zone or localize to requested time
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_43tz_convert, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_302)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__tz_convert, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":339
 *             return Timestamp(self.value, tz=tz)
 * 
 *     astimezone = tz_convert             # <<<<<<<<<<<<<<
 * 
 *     def replace(self, **kwds):
 */
  __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_n_s__tz_convert);
  if (unlikely(!__pyx_t_3)) {
    PyErr_Clear();
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__tz_convert);
  }
  if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__astimezone, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":341
 *     astimezone = tz_convert
 * 
 *     def replace(self, **kwds):             # <<<<<<<<<<<<<<
 *         return Timestamp(datetime.replace(self, **kwds),
 *                          offset=self.offset)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_45replace, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_304)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__replace, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":345
 *                          offset=self.offset)
 * 
 *     def to_pydatetime(self, warn=True):             # <<<<<<<<<<<<<<
 *         """
 *         If warn=True, issue warning if nanoseconds is nonzero
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_47to_pydatetime, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_306)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_3, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_3)->__pyx_arg_warn = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_3, __pyx_pf_6pandas_5tslib_9Timestamp_52__defaults__);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__to_pydatetime, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":361
 *                         ts.dts.us, ts.tzinfo)
 * 
 *     def isoformat(self, sep='T'):             # <<<<<<<<<<<<<<
 *         base = super(_Timestamp, self).isoformat(sep=sep)
 *         if self.nanosecond == 0:
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_49isoformat, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_308)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_309));
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__isoformat, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":378
 *         return base1 + base2
 * 
 *     def _has_time_component(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns if the Timestamp has a time component
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_51_has_time_component, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_311)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___has_time_component, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":142
 * # Python front end to C extension type _Timestamp
 * # This serves as the box for datetime64
 * class Timestamp(_Timestamp):             # <<<<<<<<<<<<<<
 *     """TimeStamp is the pandas equivalent of python's Datetime
 *     and is interchangable with it in most cases. It's the type used
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)));
  if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_312)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2), __pyx_n_s__Timestamp, __pyx_n_s_248); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Timestamp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":388
 * 
 * 
 * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN'])             # <<<<<<<<<<<<<<
 * class NaTType(_NaT):
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (unlikely(PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NaT)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__nat)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NAT)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__nan)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NaN)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_2, ((PyObject *)__pyx_n_s__NAN)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___nat_strings, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":389
 * 
 * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN'])
 * class NaTType(_NaT):             # <<<<<<<<<<<<<<
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));

  /* "pandas/tslib.pyx":392
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef _NaT base
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_314)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____new__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":401
 *         return base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_3__repr__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_316)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____repr__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":404
 *         return 'NaT'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_5__str__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_318)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____str__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":407
 *         return 'NaT'
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return iNaT
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_7__hash__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_320)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____hash__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":410
 *         return iNaT
 * 
 *     def weekday(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_9weekday, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_322)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__weekday, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":413
 *         return -1
 * 
 *     def toordinal(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_11toordinal, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_324)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__toordinal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":389
 * 
 * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN'])
 * class NaTType(_NaT):             # <<<<<<<<<<<<<<
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)));
  if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_325)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2), __pyx_n_s__NaTType, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NaTType, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":416
 *         return -1
 * 
 * fields = ['year', 'quarter', 'month', 'day', 'hour',             # <<<<<<<<<<<<<<
 *           'minute', 'second', 'microsecond', 'nanosecond',
 *           'week', 'dayofyear']
 */
  __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__quarter));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__quarter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__quarter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__month));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__day));
  PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__day));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hour));
  PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_s__hour));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hour));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minute));
  PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_s__minute));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minute));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__second));
  PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_s__second));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__second));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__microsecond));
  PyList_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_s__microsecond));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__microsecond));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nanosecond));
  PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_s__nanosecond));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nanosecond));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__week));
  PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_s__week));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__week));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dayofyear));
  PyList_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_s__dayofyear));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dayofyear));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fields, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":419
 *           'minute', 'second', 'microsecond', 'nanosecond',
 *           'week', 'dayofyear']
 * for field in fields:             # <<<<<<<<<<<<<<
 *     prop = property(fget=lambda self: -1)
 *     setattr(NaTType, field, prop)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_10(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__field, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":420
 *           'week', 'dayofyear']
 * for field in fields:
 *     prop = property(fget=lambda self: -1)             # <<<<<<<<<<<<<<
 *     setattr(NaTType, field, prop)
 * 
 */
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_100lambda1, 0, NULL, __pyx_n_s_248, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__fget), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__prop, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":421
 * for field in fields:
 *     prop = property(fget=lambda self: -1)
 *     setattr(NaTType, field, prop)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaTType); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__prop); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = PyObject_SetAttr(__pyx_t_1, __pyx_t_2, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":424
 * 
 * 
 * NaT = NaTType()             # <<<<<<<<<<<<<<
 * 
 * iNaT = util.get_nat()
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaTType); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NaT, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":426
 * NaT = NaTType()
 * 
 * iNaT = util.get_nat()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64(get_nat()); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__iNaT, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":444
 *         return ', tz=%s' % zone
 * 
 * def is_timestamp_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7is_timestamp_array, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_timestamp_array, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":480
 * # These are defined as magic numbers due to strange
 * # wraparound behavior when using the true int64 lower boundary
 * cdef int64_t _NS_LOWER_BOUND = -9223285636854775000LL             # <<<<<<<<<<<<<<
 * cdef int64_t _NS_UPPER_BOUND = 9223372036854775807LL
 * 
 */
  __pyx_v_6pandas_5tslib__NS_LOWER_BOUND = -9223285636854775000;

  /* "pandas/tslib.pyx":481
 * # wraparound behavior when using the true int64 lower boundary
 * cdef int64_t _NS_LOWER_BOUND = -9223285636854775000LL
 * cdef int64_t _NS_UPPER_BOUND = 9223372036854775807LL             # <<<<<<<<<<<<<<
 * 
 * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS
 */
  __pyx_v_6pandas_5tslib__NS_UPPER_BOUND = 9223372036854775807LL;

  /* "pandas/tslib.pyx":484
 * 
 * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS
 * pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS)             # <<<<<<<<<<<<<<
 * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS)
 * 
 */
  pandas_datetime_to_datetimestruct(__pyx_v_6pandas_5tslib__NS_LOWER_BOUND, PANDAS_FR_ns, (&__pyx_v_6pandas_5tslib__NS_MIN_DTS));

  /* "pandas/tslib.pyx":485
 * cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS
 * pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS)
 * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS)             # <<<<<<<<<<<<<<
 * 
 * Timestamp.min = Timestamp(_NS_LOWER_BOUND)
 */
  pandas_datetime_to_datetimestruct(__pyx_v_6pandas_5tslib__NS_UPPER_BOUND, PANDAS_FR_ns, (&__pyx_v_6pandas_5tslib__NS_MAX_DTS));

  /* "pandas/tslib.pyx":487
 * pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS)
 * 
 * Timestamp.min = Timestamp(_NS_LOWER_BOUND)             # <<<<<<<<<<<<<<
 * Timestamp.max = Timestamp(_NS_UPPER_BOUND)
 * 
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib__NS_LOWER_BOUND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_t_2, __pyx_n_s__min, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":488
 * 
 * Timestamp.min = Timestamp(_NS_LOWER_BOUND)
 * Timestamp.max = Timestamp(_NS_UPPER_BOUND)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib__NS_UPPER_BOUND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_t_11, __pyx_n_s__max, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":494
 * # Frequency inference
 * 
 * def unique_deltas(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_11unique_deltas, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__unique_deltas, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":522
 * 
 * 
 * def apply_offset(ndarray[object] values, object offset):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_13apply_offset, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__apply_offset, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":549
 * cdef int _reverse_ops[6]
 * 
 * _reverse_ops[Py_LT] = Py_GT             # <<<<<<<<<<<<<<
 * _reverse_ops[Py_LE] = Py_GE
 * _reverse_ops[Py_EQ] = Py_EQ
 */
  (__pyx_v_6pandas_5tslib__reverse_ops[Py_LT]) = Py_GT;

  /* "pandas/tslib.pyx":550
 * 
 * _reverse_ops[Py_LT] = Py_GT
 * _reverse_ops[Py_LE] = Py_GE             # <<<<<<<<<<<<<<
 * _reverse_ops[Py_EQ] = Py_EQ
 * _reverse_ops[Py_NE] = Py_NE
 */
  (__pyx_v_6pandas_5tslib__reverse_ops[Py_LE]) = Py_GE;

  /* "pandas/tslib.pyx":551
 * _reverse_ops[Py_LT] = Py_GT
 * _reverse_ops[Py_LE] = Py_GE
 * _reverse_ops[Py_EQ] = Py_EQ             # <<<<<<<<<<<<<<
 * _reverse_ops[Py_NE] = Py_NE
 * _reverse_ops[Py_GT] = Py_LT
 */
  (__pyx_v_6pandas_5tslib__reverse_ops[Py_EQ]) = Py_EQ;

  /* "pandas/tslib.pyx":552
 * _reverse_ops[Py_LE] = Py_GE
 * _reverse_ops[Py_EQ] = Py_EQ
 * _reverse_ops[Py_NE] = Py_NE             # <<<<<<<<<<<<<<
 * _reverse_ops[Py_GT] = Py_LT
 * _reverse_ops[Py_GE] = Py_LE
 */
  (__pyx_v_6pandas_5tslib__reverse_ops[Py_NE]) = Py_NE;

  /* "pandas/tslib.pyx":553
 * _reverse_ops[Py_EQ] = Py_EQ
 * _reverse_ops[Py_NE] = Py_NE
 * _reverse_ops[Py_GT] = Py_LT             # <<<<<<<<<<<<<<
 * _reverse_ops[Py_GE] = Py_LE
 * 
 */
  (__pyx_v_6pandas_5tslib__reverse_ops[Py_GT]) = Py_LT;

  /* "pandas/tslib.pyx":554
 * _reverse_ops[Py_NE] = Py_NE
 * _reverse_ops[Py_GT] = Py_LT
 * _reverse_ops[Py_GE] = Py_LE             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (__pyx_v_6pandas_5tslib__reverse_ops[Py_GE]) = Py_LE;

  /* "pandas/tslib.pyx":557
 * 
 * 
 * cdef str _NDIM_STRING = "ndim"             # <<<<<<<<<<<<<<
 * 
 * # This is PITA. Because we inherit from datetime, which has very specific
 */
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ndim));
  __Pyx_XGOTREF(((PyObject *)__pyx_v_6pandas_5tslib__NDIM_STRING));
  __Pyx_DECREF(((PyObject *)__pyx_v_6pandas_5tslib__NDIM_STRING));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ndim));
  __pyx_v_6pandas_5tslib__NDIM_STRING = __pyx_n_s__ndim;

  /* "pandas/tslib.pyx":690
 * 
 * 
 * cdef PyTypeObject* ts_type = <PyTypeObject*> Timestamp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_6pandas_5tslib_ts_type = ((PyTypeObject *)__pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":699
 * cdef bint _nat_scalar_rules[6]
 * 
 * _nat_scalar_rules[Py_EQ] = False             # <<<<<<<<<<<<<<
 * _nat_scalar_rules[Py_NE] = True
 * _nat_scalar_rules[Py_LT] = False
 */
  (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_EQ]) = 0;

  /* "pandas/tslib.pyx":700
 * 
 * _nat_scalar_rules[Py_EQ] = False
 * _nat_scalar_rules[Py_NE] = True             # <<<<<<<<<<<<<<
 * _nat_scalar_rules[Py_LT] = False
 * _nat_scalar_rules[Py_LE] = False
 */
  (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_NE]) = 1;

  /* "pandas/tslib.pyx":701
 * _nat_scalar_rules[Py_EQ] = False
 * _nat_scalar_rules[Py_NE] = True
 * _nat_scalar_rules[Py_LT] = False             # <<<<<<<<<<<<<<
 * _nat_scalar_rules[Py_LE] = False
 * _nat_scalar_rules[Py_GT] = False
 */
  (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_LT]) = 0;

  /* "pandas/tslib.pyx":702
 * _nat_scalar_rules[Py_NE] = True
 * _nat_scalar_rules[Py_LT] = False
 * _nat_scalar_rules[Py_LE] = False             # <<<<<<<<<<<<<<
 * _nat_scalar_rules[Py_GT] = False
 * _nat_scalar_rules[Py_GE] = False
 */
  (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_LE]) = 0;

  /* "pandas/tslib.pyx":703
 * _nat_scalar_rules[Py_LT] = False
 * _nat_scalar_rules[Py_LE] = False
 * _nat_scalar_rules[Py_GT] = False             # <<<<<<<<<<<<<<
 * _nat_scalar_rules[Py_GE] = False
 * 
 */
  (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_GT]) = 0;

  /* "pandas/tslib.pyx":704
 * _nat_scalar_rules[Py_LE] = False
 * _nat_scalar_rules[Py_GT] = False
 * _nat_scalar_rules[Py_GE] = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (__pyx_v_6pandas_5tslib__nat_scalar_rules[Py_GE]) = 0;

  /* "pandas/tslib.pyx":728
 * 
 * 
 * def _delta_to_nanoseconds(delta):             # <<<<<<<<<<<<<<
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_15_delta_to_nanoseconds, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_40, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":890
 * 
 * 
 * def get_timezone(tz):             # <<<<<<<<<<<<<<
 *     return _get_zone(tz)
 * 
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_19get_timezone, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_timezone, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":909
 * 
 * 
 * class OutOfBoundsDatetime(ValueError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_builtin_ValueError);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_ValueError);
  __Pyx_GIVEREF(__pyx_builtin_ValueError);
  __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_11), __pyx_n_s__OutOfBoundsDatetime, __pyx_n_s_248); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__OutOfBoundsDatetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":939
 * #     obj.dtval = _dts_to_pydatetime(&obj.dts)
 * 
 * def datetime_to_datetime64(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_21datetime_to_datetime64, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_338, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":974
 *     return result, inferred_tz
 * 
 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T'])             # <<<<<<<<<<<<<<
 * 
 * def _does_string_look_like_datetime(date_string):
 */
  __pyx_t_11 = PySet_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__a)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__A)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__m)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__M)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__p)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__P)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__t)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_11, ((PyObject *)__pyx_n_s__T)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_52, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":976
 * _not_datelike_strings = set(['a','A','m','M','p','P','t','T'])
 * 
 * def _does_string_look_like_datetime(date_string):             # <<<<<<<<<<<<<<
 *     if date_string.startswith('0'):
 *         # Strings starting with 0 are more consistent with a
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_23_does_string_look_like_datetime, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_53, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":993
 *     return True
 * 
 * def parse_datetime_string(date_string, **kwargs):             # <<<<<<<<<<<<<<
 *     if not _does_string_look_like_datetime(date_string):
 *         raise ValueError('Given date string not likely a datetime.')
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_25parse_datetime_string, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_62, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1000
 *     return dt
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,             # <<<<<<<<<<<<<<
 *                       format=None, utc=None, coerce=False, unit=None):
 *     cdef:
 */
  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_56 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_57 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1001
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,
 *                       format=None, utc=None, coerce=False, unit=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_58 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1000
 *     return dt
 * 
 * def array_to_datetime(ndarray[object] values, raise_=False, dayfirst=False,             # <<<<<<<<<<<<<<
 *                       format=None, utc=None, coerce=False, unit=None):
 *     cdef:
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_27array_to_datetime, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__array_to_datetime, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1169
 *         return oresult
 * 
 * def array_to_timedelta64(ndarray[object] values, coerce=False):             # <<<<<<<<<<<<<<
 *     """ convert an ndarray to an array of ints that are timedeltas
 *         force conversion if coerce = True,
 */
  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_65 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_29array_to_timedelta64, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_347, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1185
 *     return iresult
 * 
 * def convert_to_timedelta(object ts, object unit='ns', coerce=False):             # <<<<<<<<<<<<<<
 *     return convert_to_timedelta64(ts, unit, coerce)
 * 
 */
  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_68 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_31convert_to_timedelta, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_350, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1244
 *     return ts.astype('timedelta64[ns]')
 * 
 * def repr_timedelta64(object value, format=None):             # <<<<<<<<<<<<<<
 *    """
 *     provide repr for timedelta64
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_33repr_timedelta64, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__repr_timedelta64, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1313
 * 
 * 
 * def array_strptime(ndarray[object] values, object fmt, coerce=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_82 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_35array_strptime, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__array_strptime, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1599
 *     return <int64_t> (base*m) + <int64_t> (frac*m)
 * 
 * def cast_to_nanoseconds(ndarray arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = arr.size
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_39cast_to_nanoseconds, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cast_to_nanoseconds, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1631
 * 
 * 
 * def pydt_to_i8(object pydt):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert to int64 representation compatible with numpy datetime64; converts
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_41pydt_to_i8, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pydt_to_i8, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1643
 *     return ts.value
 * 
 * def i8_to_pydt(int64_t i8, object tzinfo = None):             # <<<<<<<<<<<<<<
 *     '''
 *     Inverse of pydt_to_i8
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_43i8_to_pydt, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__i8_to_pydt, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1652
 * # time zone conversion helpers
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from dateutil.tz import tzutc as _du_utc
 *     import pytz
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "pandas/tslib.pyx":1653
 * 
 * try:
 *     from dateutil.tz import tzutc as _du_utc             # <<<<<<<<<<<<<<
 *     import pytz
 *     UTC = pytz.utc
 */
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__tzutc));
      PyList_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_n_s__tzutc));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzutc));
      __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_249), ((PyObject *)__pyx_t_11), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__tzutc);
      if (__pyx_t_11 == NULL) {
        if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__tzutc);
        if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      }
      __Pyx_GOTREF(__pyx_t_11);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s___du_utc, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":1654
 * try:
 *     from dateutil.tz import tzutc as _du_utc
 *     import pytz             # <<<<<<<<<<<<<<
 *     UTC = pytz.utc
 *     have_pytz = True
 */
      __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pytz, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":1655
 *     from dateutil.tz import tzutc as _du_utc
 *     import pytz
 *     UTC = pytz.utc             # <<<<<<<<<<<<<<
 *     have_pytz = True
 * except:
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__utc); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UTC, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pandas/tslib.pyx":1656
 *     import pytz
 *     UTC = pytz.utc
 *     have_pytz = True             # <<<<<<<<<<<<<<
 * except:
 *     have_pytz = False
 */
      __pyx_t_11 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_11);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__have_pytz, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L21_try_end;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "pandas/tslib.pyx":1657
 *     UTC = pytz.utc
 *     have_pytz = True
 * except:             # <<<<<<<<<<<<<<
 *     have_pytz = False
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":1658
 *     have_pytz = True
 * except:
 *     have_pytz = False             # <<<<<<<<<<<<<<
 * 
 * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):
 */
      __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__have_pytz, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L15_exception_handled;
    }
    __pyx_L16_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L15_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    __pyx_L21_try_end:;
  }

  /* "pandas/tslib.pyx":1660
 *     have_pytz = False
 * 
 * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] utc_dates, result, trans, deltas
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_45tz_convert, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tz_convert, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1738
 *     return result
 * 
 * def tz_convert_single(int64_t val, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] trans, deltas
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_47tz_convert_single, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tz_convert_single, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1785
 * 
 * 
 * trans_cache = {}             # <<<<<<<<<<<<<<
 * utc_offset_cache = {}
 * 
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__trans_cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1786
 * 
 * trans_cache = {}
 * utc_offset_cache = {}             # <<<<<<<<<<<<<<
 * 
 * def _get_transitions(tz):
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__utc_offset_cache, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1788
 * utc_offset_cache = {}
 * 
 * def _get_transitions(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC times of DST transitions
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_49_get_transitions, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___get_transitions, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1812
 *     return trans_cache[tz]
 * 
 * def _get_deltas(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC offsets in microseconds corresponding to DST transitions
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_51_get_deltas, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___get_deltas, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1837
 *             10**6)
 * 
 * def tot_seconds(td):             # <<<<<<<<<<<<<<
 *     return total_seconds(td)
 * 
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_53tot_seconds, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tot_seconds, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1856
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def tz_localize_to_utc(ndarray[int64_t] vals, object tz, bint infer_dst=False):             # <<<<<<<<<<<<<<
 *     """
 *     Localize tzinfo-naive DateRange to given time zone (using pytz). If
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_57tz_localize_to_utc, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tz_localize_to_utc, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2028
 * #----------------------------------------------------------------------
 * 
 * def build_field_sarray(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_59build_field_sarray, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__build_field_sarray, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2070
 *     return out
 * 
 * def get_time_micros(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_61get_time_micros, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_time_micros, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2089
 * 
 * @cython.wraparound(False)
 * def get_date_field(ndarray[int64_t] dtindex, object field):             # <<<<<<<<<<<<<<
 *     '''
 *     Given a int64-based datetime index, extract the year, month, etc.,
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_63get_date_field, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_date_field, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2236
 *     return ts_dayofweek(ts)
 * 
 * cdef int64_t DAY_NS = 86400000000000LL             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_6pandas_5tslib_DAY_NS = 86400000000000LL;

  /* "pandas/tslib.pyx":2239
 * 
 * 
 * def date_normalize(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_65date_normalize, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__date_normalize, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2334
 * 
 * 
 * def dates_normalized(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_67dates_normalized, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__dates_normalized, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2372
 * #----------------------------------------------------------------------
 * 
 * def isleapyear(int64_t year):             # <<<<<<<<<<<<<<
 *     return is_leapyear(year)
 * 
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_69isleapyear, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isleapyear, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2375
 *     return is_leapyear(year)
 * 
 * def monthrange(int64_t year, int64_t month):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t days
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_71monthrange, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__monthrange, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2529
 *     int get_yq(int64_t ordinal, int freq, int *quarter, int *year)
 * 
 * initialize_daytime_conversion_factor_matrix()             # <<<<<<<<<<<<<<
 * 
 * # Period logic
 */
  initialize_daytime_conversion_factor_matrix();

  /* "pandas/tslib.pyx":2554
 *     return period_ord_w_mult * mult + 1;
 * 
 * def dt64arr_to_periodarr(ndarray[int64_t] dtarr, int freq, tz=None):             # <<<<<<<<<<<<<<
 *     """
 *     Convert array of datetime64 values (passed in as 'i8' dtype) to a set of
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_75dt64arr_to_periodarr, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_389, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2577
 *     return out
 * 
 * def periodarr_to_dt64arr(ndarray[int64_t] periodarr, int freq):             # <<<<<<<<<<<<<<
 *     """
 *     Convert array to datetime64 values from a set of ordinals corresponding to
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_77periodarr_to_dt64arr, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_392, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2595
 *     return out
 * 
 * cdef char START = 'S'             # <<<<<<<<<<<<<<
 * cdef char END = 'E'
 * 
 */
  __pyx_v_6pandas_5tslib_START = 'S';

  /* "pandas/tslib.pyx":2596
 * 
 * cdef char START = 'S'
 * cdef char END = 'E'             # <<<<<<<<<<<<<<
 * 
 * cpdef int64_t period_asfreq(int64_t period_ordinal, int freq1, int freq2,
 */
  __pyx_v_6pandas_5tslib_END = 'E';

  /* "pandas/tslib.pyx":2617
 *     return retval
 * 
 * def period_asfreq_arr(ndarray[int64_t] arr, int freq1, int freq2, bint end):             # <<<<<<<<<<<<<<
 *     """
 *     Convert int64-array of period ordinals from one frequency to another, and
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_81period_asfreq_arr, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__period_asfreq_arr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2649
 *     return result
 * 
 * def period_ordinal(int y, int m, int d, int h, int min, int s, int us, int ps, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t ordinal
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_83period_ordinal, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__period_ordinal, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2676
 *     return pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts)
 * 
 * def period_format(int64_t value, int freq, object fmt=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int freq_group
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_87period_format, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__period_format, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2719
 *                         (b"%l", b"^`GH`^"),
 *                         (b"%u", b"^`IJ`^"),
 *                         (b"%n", b"^`KL`^")]             # <<<<<<<<<<<<<<
 * 
 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"]
 */
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_401));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_k_tuple_401));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_401));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_404));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_k_tuple_404));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_404));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_407));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_k_tuple_407));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_407));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_410));
  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_k_tuple_410));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_410));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_413));
  PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_k_tuple_413));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_413));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_416));
  PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_k_tuple_416));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_416));
  __Pyx_XGOTREF(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts));
  __Pyx_DECREF(((PyObject *)__pyx_v_6pandas_5tslib_extra_fmts));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_v_6pandas_5tslib_extra_fmts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2721
 *                         (b"%n", b"^`KL`^")]
 * 
 * cdef list str_extra_fmts = ["^`AB`^", "^`CD`^", "^`EF`^", "^`GH`^", "^`IJ`^", "^`KL`^"]             # <<<<<<<<<<<<<<
 * 
 * cdef object _period_strftime(int64_t value, int freq, object fmt):
 */
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_400));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_400));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_400));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_403));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_403));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_403));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_406));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_kp_s_406));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_406));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_409));
  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_kp_s_409));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_409));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_412));
  PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_412));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_412));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_415));
  PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_kp_s_415));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_415));
  __Pyx_XGOTREF(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts));
  __Pyx_DECREF(((PyObject *)__pyx_v_6pandas_5tslib_str_extra_fmts));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  __pyx_v_6pandas_5tslib_str_extra_fmts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2779
 * ctypedef int (*accessor)(int64_t ordinal, int freq) except INT32_MIN
 * 
 * def get_period_field(int code, int64_t value, int freq):             # <<<<<<<<<<<<<<
 *     cdef accessor f = _get_accessor_func(code)
 *     if f is NULL:
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_89get_period_field, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_period_field, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2785
 *     return f(value, freq)
 * 
 * def get_period_field_arr(int code, ndarray[int64_t] arr, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_91get_period_field_arr, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_421, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2831
 * 
 * 
 * def extract_ordinals(ndarray[object] values, freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_93extract_ordinals, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__extract_ordinals, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2865
 *         return reso
 * 
 * US_RESO = 0             # <<<<<<<<<<<<<<
 * S_RESO = 1
 * T_RESO = 2
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__US_RESO, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2866
 * 
 * US_RESO = 0
 * S_RESO = 1             # <<<<<<<<<<<<<<
 * T_RESO = 2
 * H_RESO = 3
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__S_RESO, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2867
 * US_RESO = 0
 * S_RESO = 1
 * T_RESO = 2             # <<<<<<<<<<<<<<
 * H_RESO = 3
 * D_RESO = 4
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__T_RESO, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2868
 * S_RESO = 1
 * T_RESO = 2
 * H_RESO = 3             # <<<<<<<<<<<<<<
 * D_RESO = 4
 * 
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__H_RESO, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2869
 * T_RESO = 2
 * H_RESO = 3
 * D_RESO = 4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int _reso_stamp(pandas_datetimestruct *dts):
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__D_RESO, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2957
 * 
 * """
 * import time             # <<<<<<<<<<<<<<
 * import locale
 * import calendar
 */
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2958
 * """
 * import time
 * import locale             # <<<<<<<<<<<<<<
 * import calendar
 * from re import compile as re_compile
 */
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__locale), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__locale, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2959
 * import time
 * import locale
 * import calendar             # <<<<<<<<<<<<<<
 * from re import compile as re_compile
 * from re import IGNORECASE
 */
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__calendar), 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__calendar, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2960
 * import locale
 * import calendar
 * from re import compile as re_compile             # <<<<<<<<<<<<<<
 * from re import IGNORECASE
 * from re import escape as re_escape
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__compile));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__compile));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__compile));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__compile);
  if (__pyx_t_3 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__compile);
    if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re_compile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":2961
 * import calendar
 * from re import compile as re_compile
 * from re import IGNORECASE             # <<<<<<<<<<<<<<
 * from re import escape as re_escape
 * from datetime import date as datetime_date
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__IGNORECASE));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__IGNORECASE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IGNORECASE));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__IGNORECASE);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__IGNORECASE);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IGNORECASE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2962
 * from re import compile as re_compile
 * from re import IGNORECASE
 * from re import escape as re_escape             # <<<<<<<<<<<<<<
 * from datetime import date as datetime_date
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__escape));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__escape));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__escape));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__escape);
  if (__pyx_t_3 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__escape);
    if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re_escape, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":2963
 * from re import IGNORECASE
 * from re import escape as re_escape
 * from datetime import date as datetime_date             # <<<<<<<<<<<<<<
 * 
 * # Python 2 vs Python 3
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__date);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__date);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__datetime_date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2966
 * 
 * # Python 2 vs Python 3
 * try:             # <<<<<<<<<<<<<<
 *     from thread import allocate_lock as _thread_allocate_lock
 * except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "pandas/tslib.pyx":2967
 * # Python 2 vs Python 3
 * try:
 *     from thread import allocate_lock as _thread_allocate_lock             # <<<<<<<<<<<<<<
 * except:
 *     try:
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock));
      PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__allocate_lock));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock));
      __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__thread), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__allocate_lock);
      if (__pyx_t_3 == NULL) {
        if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__allocate_lock);
        if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      }
      __Pyx_GOTREF(__pyx_t_3);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s_424, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L31_try_end;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":2968
 * try:
 *     from thread import allocate_lock as _thread_allocate_lock
 * except:             # <<<<<<<<<<<<<<
 *     try:
 *         from _thread import allocate_lock as _thread_allocate_lock
 */
    /*except:*/ {
      __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/tslib.pyx":2969
 *     from thread import allocate_lock as _thread_allocate_lock
 * except:
 *     try:             # <<<<<<<<<<<<<<
 *         from _thread import allocate_lock as _thread_allocate_lock
 *     except:
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_15);
        /*try:*/ {

          /* "pandas/tslib.pyx":2970
 * except:
 *     try:
 *         from _thread import allocate_lock as _thread_allocate_lock             # <<<<<<<<<<<<<<
 *     except:
 *         try:
 */
          __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock));
          PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__allocate_lock));
          __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock));
          __pyx_t_16 = __Pyx_Import(((PyObject *)__pyx_n_s___thread), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
          __pyx_t_1 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__allocate_lock);
          if (__pyx_t_1 == NULL) {
            if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__allocate_lock);
            if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          }
          __Pyx_GOTREF(__pyx_t_1);
          if (PyObject_SetAttr(__pyx_m, __pyx_n_s_424, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        goto __pyx_L41_try_end;
        __pyx_L34_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "pandas/tslib.pyx":2971
 *     try:
 *         from _thread import allocate_lock as _thread_allocate_lock
 *     except:             # <<<<<<<<<<<<<<
 *         try:
 *             from dummy_thread import allocate_lock as _thread_allocate_lock
 */
        /*except:*/ {
          __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_1, &__pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L36_except_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_17);

          /* "pandas/tslib.pyx":2972
 *         from _thread import allocate_lock as _thread_allocate_lock
 *     except:
 *         try:             # <<<<<<<<<<<<<<
 *             from dummy_thread import allocate_lock as _thread_allocate_lock
 *         except:
 */
          {
            __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            /*try:*/ {

              /* "pandas/tslib.pyx":2973
 *     except:
 *         try:
 *             from dummy_thread import allocate_lock as _thread_allocate_lock             # <<<<<<<<<<<<<<
 *         except:
 *             from _dummy_thread import allocate_lock as _thread_allocate_lock
 */
              __pyx_t_21 = PyList_New(1); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;}
              __Pyx_GOTREF(__pyx_t_21);
              __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock));
              PyList_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_n_s__allocate_lock));
              __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock));
              __pyx_t_22 = __Pyx_Import(((PyObject *)__pyx_n_s__dummy_thread), ((PyObject *)__pyx_t_21), -1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;}
              __Pyx_GOTREF(__pyx_t_22);
              __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;
              __pyx_t_21 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__allocate_lock);
              if (__pyx_t_21 == NULL) {
                if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__allocate_lock);
                if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;}
              }
              __Pyx_GOTREF(__pyx_t_21);
              if (PyObject_SetAttr(__pyx_m, __pyx_n_s_424, __pyx_t_21) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L44_error;}
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            }
            __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
            goto __pyx_L51_try_end;
            __pyx_L44_error:;
            __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;

            /* "pandas/tslib.pyx":2974
 *         try:
 *             from dummy_thread import allocate_lock as _thread_allocate_lock
 *         except:             # <<<<<<<<<<<<<<
 *             from _dummy_thread import allocate_lock as _thread_allocate_lock
 * 
 */
            /*except:*/ {
              __Pyx_AddTraceback("pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_23) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;}
              __Pyx_GOTREF(__pyx_t_22);
              __Pyx_GOTREF(__pyx_t_21);
              __Pyx_GOTREF(__pyx_t_23);

              /* "pandas/tslib.pyx":2975
 *             from dummy_thread import allocate_lock as _thread_allocate_lock
 *         except:
 *             from _dummy_thread import allocate_lock as _thread_allocate_lock             # <<<<<<<<<<<<<<
 * 
 * __all__ = []
 */
              __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;}
              __Pyx_GOTREF(__pyx_t_24);
              __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock));
              PyList_SET_ITEM(__pyx_t_24, 0, ((PyObject *)__pyx_n_s__allocate_lock));
              __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allocate_lock));
              __pyx_t_25 = __Pyx_Import(((PyObject *)__pyx_n_s___dummy_thread), ((PyObject *)__pyx_t_24), -1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;}
              __Pyx_GOTREF(__pyx_t_25);
              __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
              __pyx_t_24 = PyObject_GetAttr(__pyx_t_25, __pyx_n_s__allocate_lock);
              if (__pyx_t_24 == NULL) {
                if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__allocate_lock);
                if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;}
              }
              __Pyx_GOTREF(__pyx_t_24);
              if (PyObject_SetAttr(__pyx_m, __pyx_n_s_424, __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;}
              __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
              __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
              __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
              goto __pyx_L45_exception_handled;
            }
            __pyx_L46_except_error:;
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
            goto __pyx_L36_except_error;
            __pyx_L45_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
            __pyx_L51_try_end:;
          }
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          goto __pyx_L35_exception_handled;
        }
        __pyx_L36_except_error:;
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        goto __pyx_L26_except_error;
        __pyx_L35_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        __pyx_L41_try_end:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L25_exception_handled;
    }
    __pyx_L26_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L25_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L31_try_end:;
  }

  /* "pandas/tslib.pyx":2977
 *             from _dummy_thread import allocate_lock as _thread_allocate_lock
 * 
 * __all__ = []             # <<<<<<<<<<<<<<
 * 
 * def _getlang():
 */
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":2979
 * __all__ = []
 * 
 * def _getlang():             # <<<<<<<<<<<<<<
 *     # Figure out what the current language is set to.
 *     return locale.getlocale(locale.LC_TIME)
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_97_getlang, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___getlang, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":2983
 *     return locale.getlocale(locale.LC_TIME)
 * 
 * class LocaleTime(object):             # <<<<<<<<<<<<<<
 *     """Stores and handles locale-specific information related to time.
 * 
 */
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));

  /* "pandas/tslib.pyx":3002
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Set all attributes.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_427)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s____init__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3031
 *             raise ValueError("locale changed during initialization")
 * 
 *     def __pad(self, seq, front):             # <<<<<<<<<<<<<<
 *         # Add '' to seq to either the front (is True), else the back.
 *         seq = list(seq)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_3__pad, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_429)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s___LocaleTime__pad, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3040
 *         return seq
 * 
 *     def __calc_weekday(self):             # <<<<<<<<<<<<<<
 *         # Set self.a_weekday and self.f_weekday using the calendar
 *         # module.
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_5__calc_weekday, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_431)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_149, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3048
 *         self.f_weekday = f_weekday
 * 
 *     def __calc_month(self):             # <<<<<<<<<<<<<<
 *         # Set self.f_month and self.a_month using the calendar module.
 *         a_month = [calendar.month_abbr[i].lower() for i in range(13)]
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_7__calc_month, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_433)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_150, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3055
 *         self.f_month = f_month
 * 
 *     def __calc_am_pm(self):             # <<<<<<<<<<<<<<
 *         # Set self.am_pm by using time.strftime().
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_9__calc_am_pm, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_435)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_151, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3067
 *         self.am_pm = am_pm
 * 
 *     def __calc_date_time(self):             # <<<<<<<<<<<<<<
 *         # Set self.date_time, self.date, & self.time by using
 *         # time.strftime().
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_11__calc_date_time, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_437)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_153, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3112
 *         self.LC_time = date_time[2]
 * 
 *     def __calc_timezone(self):             # <<<<<<<<<<<<<<
 *         # Set self.timezone by using time.tzname.
 *         # Do not worry about possibility of time.tzname[0] == timetzname[1]
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_13__calc_timezone, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_439)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_152, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2983
 *     return locale.getlocale(locale.LC_TIME)
 * 
 * class LocaleTime(object):             # <<<<<<<<<<<<<<
 *     """Stores and handles locale-specific information related to time.
 * 
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  if (PyDict_SetItemString(((PyObject *)__pyx_t_11), "__doc__", ((PyObject *)__pyx_kp_s_440)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_11), __pyx_n_s__LocaleTime, __pyx_n_s_248); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__LocaleTime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3128
 * 
 * 
 * class TimeRE(dict):             # <<<<<<<<<<<<<<
 *     """Handle conversion from format directives to regexes."""
 * 
 */
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));

  /* "pandas/tslib.pyx":3131
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_1__init__, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_442)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, ((PyObject *)__pyx_k_tuple_443));
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s____init__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3173
 *         base.__setitem__('X', self.pattern(self.locale_time.LC_time))
 * 
 *     def __seqToRE(self, to_convert, directive):             # <<<<<<<<<<<<<<
 *         """Convert a list to a regex string for matching a directive.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_445)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s___TimeRE__seqToRE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3192
 *         return '%s)' % regex
 * 
 *     def pattern(self, format):             # <<<<<<<<<<<<<<
 *         """Return regex pattern for the format string.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_5pattern, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_448)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s__pattern, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3215
 *         return "%s%s" % (processed_format, format)
 * 
 *     def compile(self, format):             # <<<<<<<<<<<<<<
 *         """Return a compiled re object for the format string."""
 *         return re_compile(self.pattern(format), IGNORECASE)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_7compile, 0, NULL, __pyx_n_s_248, ((PyObject *)__pyx_k_codeobj_450)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s__compile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3128
 * 
 * 
 * class TimeRE(dict):             # <<<<<<<<<<<<<<
 *     """Handle conversion from format directives to regexes."""
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyDict_Type))));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyDict_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyDict_Type))));
  if (PyDict_SetItemString(((PyObject *)__pyx_t_11), "__doc__", ((PyObject *)__pyx_kp_s_451)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_11), __pyx_n_s__TimeRE, __pyx_n_s_248); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TimeRE, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3219
 *         return re_compile(self.pattern(format), IGNORECASE)
 * 
 * _cache_lock = _thread_allocate_lock()             # <<<<<<<<<<<<<<
 * # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock
 * # first!
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s_424); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___cache_lock, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3222
 * # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock
 * # first!
 * _TimeRE_cache = TimeRE()             # <<<<<<<<<<<<<<
 * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache
 * _regex_cache = {}
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__TimeRE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___TimeRE_cache, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3223
 * # first!
 * _TimeRE_cache = TimeRE()
 * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache             # <<<<<<<<<<<<<<
 * _regex_cache = {}
 * 
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___CACHE_MAX_SIZE, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3224
 * _TimeRE_cache = TimeRE()
 * _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache
 * _regex_cache = {}             # <<<<<<<<<<<<<<
 * 
 * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon):
 */
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___regex_cache, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3226
 * _regex_cache = {}
 * 
 * def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon):             # <<<<<<<<<<<<<<
 *     """Calculate the Julian day based on the year, week of the year, and day of
 *     the week, with week_start_day representing whether the week of the year
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_99_calc_julian_from_U_or_W, NULL, __pyx_n_s_248); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_92, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1
 * # cython: profile=False             # <<<<<<<<<<<<<<
 * 
 * cimport numpy as np
 */
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "util.pxd":84
 *         return False
 * 
 * cdef inline bint _checknan(object val):             # <<<<<<<<<<<<<<
 *     return not cnp.PyArray_Check(val) and val != val
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  if (__pyx_m) {
    __Pyx_AddTraceback("init pandas.tslib", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pandas.tslib");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
  unsigned int n = 1;
  return *(unsigned char*)(&n) != 0;
}
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t < '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1) /* First char was not a digit */
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count; /* Consume from buffer string */
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break; /* breaks both loops as ctx->enc_count == 0 */
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue; /* empty struct */
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static CYTHON_INLINE PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        if (isspace(*ts))
            continue;
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
                return ts;
      case ' ':
      case 10:
      case 13:
        ++ts;
        break;
      case '<':
        if (!__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T': /* substruct */
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}': /* end of substruct; either repeat or move on */
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }        /* fall through */
      case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 's': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
        } else {
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_count = ctx->new_count;
          ctx->enc_packmode = ctx->new_packmode;
          ctx->enc_type = *ts;
          ctx->is_complex = got_Z;
        }
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}
static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  if (obj == Py_None || obj == NULL) {
    __Pyx_ZeroBuffer(buf);
    return 0;
  }
  buf->buf = NULL;
  if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
  if (buf->ndim != nd) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if ((unsigned)buf->itemsize != dtype->size) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_ZeroBuffer(buf);
  return -1;
}
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (info->buf == NULL) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (DECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = PyObject_GetAttr(o, n);
    if (!r) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *args;
        if (!value)
            args = PyTuple_New(0);
        else if (PyTuple_Check(value)) {
            Py_INCREF(value);
            args = value;
        }
        else
            args = PyTuple_Pack(1, value);
        if (!args)
            goto bad;
        owned_instance = PyEval_CallObject(type, args);
        Py_DECREF(args);
        if (!owned_instance)
            goto bad;
        value = owned_instance;
        if (!PyExceptionInstance_Check(value)) {
            PyErr_Format(PyExc_TypeError,
                         "calling %R should have returned an instance of "
                         "BaseException, not %R",
                         type, Py_TYPE(value));
            goto bad;
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause && cause != Py_None) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_mod___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t a, __pyx_t_5numpy_int64_t b) {
    __pyx_t_5numpy_int64_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static void __Pyx_RaiseBufferFallbackError(void) {
  PyErr_Format(PyExc_ValueError,
     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = PyObject_CallMethodObjArgs(iterable, method_name, NULL);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t a, __pyx_t_5numpy_int64_t b) {
    __pyx_t_5numpy_int64_t q = a / b;
    __pyx_t_5numpy_int64_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_dealloc != current_tp_dealloc)
        type = type->tp_base;
    if (type && type->tp_base)
        type->tp_base->tp_dealloc(obj);
}

static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_base && type->tp_base->tp_traverse)
        return type->tp_base->tp_traverse(obj, v, a);
    return 0;
}

static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_base && type->tp_base->tp_clear)
        type->tp_base->tp_clear(obj);
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) {
    const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_int64) == sizeof(char))  ||
        (sizeof(npy_int64) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_int64) == sizeof(int)) ||
               (sizeof(npy_int64) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
                                     little, !is_unsigned);
    }
}

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    CYTHON_UNUSED PyObject *getbuffer_cobj;
  #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
  #endif
        if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
  #if PY_VERSION_HEX < 0x02060000
    if (obj->ob_type->tp_dict &&
        (getbuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
                                             "__pyx_getbuffer"))) {
        getbufferproc func;
      #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
        func = (getbufferproc) PyCapsule_GetPointer(getbuffer_cobj, "getbuffer(obj, view, flags)");
      #else
        func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj);
      #endif
        Py_DECREF(getbuffer_cobj);
        if (!func)
            goto fail;
        return func(obj, view, flags);
    } else {
        PyErr_Clear();
    }
  #endif
    PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
#if PY_VERSION_HEX < 0x02060000
fail:
#endif
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    CYTHON_UNUSED PyObject *releasebuffer_cobj;
    if (!obj) return;
  #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
  #endif
        if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; }
  #if PY_VERSION_HEX < 0x02060000
    if (obj->ob_type->tp_dict &&
        (releasebuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
                                                      "__pyx_releasebuffer"))) {
        releasebufferproc func;
      #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
        func = (releasebufferproc) PyCapsule_GetPointer(releasebuffer_cobj, "releasebuffer(obj, view)");
      #else
        func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj);
      #endif
        Py_DECREF(releasebuffer_cobj);
        if (!func)
            goto fail;
        func(obj, view);
        return;
    } else {
        PyErr_Clear();
    }
  #endif
    goto nofail;
#if PY_VERSION_HEX < 0x02060000
fail:
#endif
    PyErr_WriteUnraisable(obj);
nofail:
    Py_DECREF(obj);
    view->obj = NULL;
}
#endif /*  PY_MAJOR_VERSION < 3 */


    static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
#if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
                 PyString_AsString(name));
#else
    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
#endif
}

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;
    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (op->func_doc == NULL && op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
        op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
        op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
    }
    if (op->func_doc == 0) {
        Py_INCREF(Py_None);
        return Py_None;
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        op->func_doc = Py_None; /* Mark as deleted */
    else
        op->func_doc = value;
    Py_INCREF(op->func_doc);
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (op->func_name == NULL) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (value == NULL || !PyUnicode_Check(value)) {
#else
    if (value == NULL || !PyString_Check(value)) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (op->func_dict == NULL) {
        op->func_dict = PyDict_New();
        if (op->func_dict == NULL)
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (value == NULL) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
{
    if (op->defaults_tuple) {
        Py_INCREF(op->defaults_tuple);
        return op->defaults_tuple;
    }
    if (op->defaults_getter) {
        PyObject *res = op->defaults_getter((PyObject *) op);
        if (res) {
            Py_INCREF(res);
            op->defaults_tuple = res;
        }
        return res;
    }
    Py_INCREF(Py_None);
    return Py_None;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_getter = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *func_name = __Pyx_CyFunction_get_name(op);
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                func_name, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(func_name), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, sizeof(size));
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}

static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) {
    const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
    const int is_unsigned = const_zero < neg_one;
    if (sizeof(npy_int64) == sizeof(char)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedChar(x);
    } else if (sizeof(npy_int64) == sizeof(short)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedShort(x);
    } else if (sizeof(npy_int64) == sizeof(int)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedInt(x);
    } else if (sizeof(npy_int64) == sizeof(long)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedLong(x);
    } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x);
    }  else {
        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
        #else
        npy_int64 val;
        PyObject *v = __Pyx_PyNumber_Int(x);
        #if PY_VERSION_HEX < 0x03000000
        if (likely(v) && !PyLong_Check(v)) {
            PyObject *tmp = v;
            v = PyNumber_Long(tmp);
            Py_DECREF(tmp);
        }
        #endif
        if (likely(v)) {
            int one = 1; int is_little = (int)*(unsigned char *)&one;
            unsigned char *bytes = (unsigned char *)&val;
            int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                          bytes, sizeof(val),
                                          is_little, !is_unsigned);
            Py_DECREF(v);
            if (likely(!ret))
                return val;
        }
        #endif
        return (npy_int64)-1;
    }
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) {
    const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_int32) == sizeof(char))  ||
        (sizeof(npy_int32) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_int32) == sizeof(int)) ||
               (sizeof(npy_int32) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int32),
                                     little, !is_unsigned);
    }
}

#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0 &&
                isspace(Py_CHARMASK(s[len-1])) &&
                s[len-1] != ' ')
                    PyFile_SoftSpace(f, 0);
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else /* Python 3 has a print function */
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItemString(kwargs, "file", stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItemString(kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C compiler
     * warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else /* Python 3 has a print function */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) {
    const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0;
    const int is_unsigned = const_zero < neg_one;
    if (sizeof(npy_int32) == sizeof(char)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedChar(x);
    } else if (sizeof(npy_int32) == sizeof(short)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedShort(x);
    } else if (sizeof(npy_int32) == sizeof(int)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedInt(x);
    } else if (sizeof(npy_int32) == sizeof(long)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedLong(x);
    } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x);
    }  else {
        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
        #else
        npy_int32 val;
        PyObject *v = __Pyx_PyNumber_Int(x);
        #if PY_VERSION_HEX < 0x03000000
        if (likely(v) && !PyLong_Check(v)) {
            PyObject *tmp = v;
            v = PyNumber_Long(tmp);
            Py_DECREF(tmp);
        }
        #endif
        if (likely(v)) {
            int one = 1; int is_little = (int)*(unsigned char *)&one;
            unsigned char *bytes = (unsigned char *)&val;
            int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                          bytes, sizeof(val),
                                          is_little, !is_unsigned);
            Py_DECREF(v);
            if (likely(!ret))
                return val;
        }
        #endif
        return (npy_int32)-1;
    }
}

static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */
        return PyClassMethod_New(method);
    }
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) { /* python classes */
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "Class-level classmethod() can only be called on "
                 "a method_descriptor or instance method.");
    return NULL;
}

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        float denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(a, a);
                    case 3:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, a);
                    case 4:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_absf(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        double denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(a, a);
                    case 3:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, a);
                    case 4:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_abs(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

static PyObject *__Pyx_Generator_Next(PyObject *self);
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Generator_Close(PyObject *self);
static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (unlikely(et != PyExc_StopIteration) &&
            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = PyObject_GetAttrString(ev, "args");
        Py_DECREF(ev);
        if (likely(args)) {
            value = PyObject_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        /* Generators always return to their most recent caller, not
         * necessarily their creator. */
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        /* Don't keep the reference to f_back any longer than necessary.  It
         * may keep a chain of frames alive or it could create a reference
         * cycle. */
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Generator_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Generator_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Send(yf, value);
        } else {
            if (value == Py_None)
                ret = PyIter_Next(yf);
            else
                ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, value);
}
static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Generator_Close(yf);
        if (!retval)
            return -1;
    } else {
        PyObject *meth;
        gen->is_running = 1;
        meth = PyObject_GetAttrString(yf, "close");
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Close(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Generator_CloseIter(gen, yf);
        __Pyx_Generator_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
#if PY_VERSION_HEX < 0x02050000
        PyErr_SetNone(PyExc_StopIteration);
#else
        PyErr_SetNone(PyExc_GeneratorExit);
#endif
    retval = __Pyx_Generator_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
#if PY_VERSION_HEX >= 0x02050000
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
#endif
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();      /* ignore these errors */
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
#if PY_VERSION_HEX >= 0x02050000
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Generator_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Generator_Undelegate(gen);
            if (err < 0)
                return __Pyx_Generator_SendEx(gen, NULL);
            goto throw_here;
        }
#endif
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Throw(yf, args);
        } else {
            PyObject *meth = PyObject_GetAttrString(yf, "throw");
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Generator_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Generator_FinishDelegation(gen);
        }
        return ret;
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Generator_SendEx(gen, NULL);
}
static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Generator_clear(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    return 0;
}
static void __Pyx_Generator_dealloc(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    PyObject_GC_Track(self);
    if (gen->resume_label > 0) {
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
            return;                     /* resurrected.  :( */
    }
    PyObject_GC_UnTrack(self);
    __Pyx_Generator_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Generator_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    if (gen->resume_label <= 0)
        return ;
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Generator_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
    /* Undo the temporary resurrection; can't use DECREF here, it would
     * cause a recursive call.
     */
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0)
        return; /* this is the normal path out */
    /* close() resurrected it!  Make it look like the original Py_DECREF
     * never happened.
     */
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_FOR_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
     * we need to undo that. */
    _Py_DEC_REFTOTAL;
#endif
    /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
     * chain, so no more to do there.
     * If COUNT_ALLOCS, the original decref bumped tp_frees, and
     * _Py_NewReference bumped tp_allocs:  both of those need to be
     * undone.
     */
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
}
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running",
#if PY_VERSION_HEX >= 0x02060000
     T_BOOL,
#else
     T_BYTE,
#endif
     offsetof(__pyx_GeneratorObject, is_running),
     READONLY,
     NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("generator"),         /*tp_name*/
    sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    0,                                   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    0,                                  /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
    0,                                  /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
    __pyx_Generator_methods,            /*tp_methods*/
    __pyx_Generator_memberlist,         /*tp_members*/
    0,                                  /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    0,                                  /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    0,                                  /*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    __Pyx_Generator_del,                /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure) {
    __pyx_GeneratorObject *gen =
        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    PyObject_GC_Track(gen);
    return gen;
}
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    if (PyType_Ready(&__pyx_GeneratorType_type)) {
        return -1;
    }
    __pyx_GeneratorType = &__pyx_GeneratorType_type;
    return 0;
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}


/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
