/* Generated by Cython 0.17.2 on Wed May 14 08:33:43 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":3101
 * # 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":3169
 *     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":3512
 *         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":836
 * 
 * # 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":3497
 *         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":630
 * # (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":782
 * 
 * 
 * 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":3455
 *     """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":3488
 *             '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":630
 * # (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);
  PyObject *(*_get_start_end_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":782
 * 
 * 
 * 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 int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*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 long __Pyx_mod_long(long, long); /* proto */

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 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 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int8_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_NotImplemented;
static PyObject *__pyx_builtin_OverflowError;
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_40is_month_start(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42is_month_end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44is_quarter_start(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46is_quarter_end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48is_year_start(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50is_year_end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_52tz_localize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_54tz_convert(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_56replace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_58to_pydatetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_warn); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_60isoformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_sep); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_62_has_time_component(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_64to_julian_date(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_8__int__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10__long__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_12weekday(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_14toordinal(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_16__reduce__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_6__nat_unpickle(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_8is_timestamp_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_10get_value_box(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_12unique_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_14apply_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_12_get_start_end_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_4_NaT_4__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_6__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_16_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_18_get_utcoffset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_20get_timezone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_22datetime_to_datetime64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_24_does_string_look_like_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_26parse_datetime_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date_string, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_28array_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_30array_to_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_coerce); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_32convert_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_34repr_timedelta64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_36array_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_38cast_from_unit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ts, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_40cast_to_nanoseconds(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_42pydt_to_i8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pydt); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_44i8_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_46tz_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_48tz_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_50_get_transitions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_52_get_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_54tot_seconds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_td); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_56_unbox_utcoffsets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_58tz_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_60build_field_sarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_62get_time_micros(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_64get_date_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_66get_start_end_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field, PyObject *__pyx_v_freqstr, int __pyx_v_month_kw); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_68date_normalize(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_70dates_normalized(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_72isleapyear(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_year); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_74monthrange(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_76normalize_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_78dt64arr_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_80periodarr_to_dt64arr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_periodarr, int __pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_82period_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_84period_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_86period_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_88period_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_90period_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_92get_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_94get_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_96extract_ordinals(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_freq); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_98resolution(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_stamps, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_6pandas_5tslib_100_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_102_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[] = "pandas.tseries.frequencies";
static char __pyx_k_3[] = "%z";
static char __pyx_k_6[] = " %%Z";
static char __pyx_k_8[] = ", tz='{0}'";
static char __pyx_k_9[] = "";
static char __pyx_k_10[] = ", offset='{0}'";
static char __pyx_k_11[] = "Timestamp('{stamp}'{tz}{offset})";
static char __pyx_k_12[] = "%d-%.2d-%.2d";
static char __pyx_k_13[] = "%.2d:%.2d:%.2d";
static char __pyx_k_14[] = ".%.9d";
static char __pyx_k_15[] = ".%.6d";
static char __pyx_k_16[] = "%s %s";
static char __pyx_k_17[] = "pandas.tseries.period";
static char __pyx_k_21[] = "M8[ns]";
static char __pyx_k_23[] = "_get_start_end_field";
static char __pyx_k_30[] = "Cannot localize tz-aware Timestamp, use tz_convert for conversions";
static char __pyx_k_32[] = "Cannot convert tz-naive Timestamp, use tz_localize to localize";
static char __pyx_k_34[] = "Warning: discarding nonzero nanoseconds";
static char __pyx_k_35[] = "%.3d";
static char __pyx_k_37[] = " %%Z, tz=%s";
static char __pyx_k_38[] = ", tz=%s";
static char __pyx_k_39[] = "index out of bounds";
static char __pyx_k_42[] = "Cannot compare type %r with type %r";
static char __pyx_k_43[] = "Cannot compare tz-naive and tz-aware timestamps";
static char __pyx_k_46[] = "timedelta64[ns]";
static char __pyx_k_49[] = "Cannot add integral value to Timestamp without offset.";
static char __pyx_k_51[] = "_delta_to_nanoseconds";
static char __pyx_k_54[] = "Could not construct Timestamp from argument %s";
static char __pyx_k_55[] = "%d-%.2d-%.2d %.2d:%.2d:%.2d";
static char __pyx_k_56[] = "Out of bounds nanosecond timestamp: %s";
static char __pyx_k_58[] = "Array must be all same time zone";
static char __pyx_k_60[] = "Cannot mix tz-aware with tz-naive values";
static char __pyx_k_62[] = "Unrecognized value type: %s";
static char __pyx_k_64[] = "_not_datelike_strings";
static char __pyx_k_65[] = "_does_string_look_like_datetime";
static char __pyx_k_66[] = "Given date string not likely a datetime.";
static char __pyx_k_72[] = "Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True";
static char __pyx_k_75[] = "parse_datetime_string";
static char __pyx_k_76[] = "mixed datetimes and integers in passed array";
static char __pyx_k_79[] = "m8[ns]";
static char __pyx_k_83[] = "m8[{0}]";
static char __pyx_k_85[] = "_np_version_under1p7";
static char __pyx_k_86[] = "Invalid type for timedelta scalar: %s";
static char __pyx_k_89[] = "%02d";
static char __pyx_k_90[] = "%02d.%06d";
static char __pyx_k_91[] = "-";
static char __pyx_k_92[] = "%s%d days, %02d:%02d:%s";
static char __pyx_k_93[] = "%s%d days";
static char __pyx_k_94[] = "%s%02d:%02d:%s";
static char __pyx_k_96[] = "\\";
static char __pyx_k_97[] = "%";
static char __pyx_k_98[] = "'%s' is a bad directive in format '%s'";
static char __pyx_k_99[] = "stray %% in format '%s'";
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__C[] = "C";
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_102[] = "time data %r does not match format %r";
static char __pyx_k_103[] = "unconverted data remains: %s";
static char __pyx_k_105[] = "_calc_julian_from_U_or_W";
static char __pyx_k_106[] = "NumPy 1.6.1 business freq not supported";
static char __pyx_k_109[] = "First time before start of DST info";
static char __pyx_k_114[] = "_utc_transition_times";
static char __pyx_k_116[] = "Could not find pytz module";
static char __pyx_k_118[] = "Cannot infer dst time from %s asthere are no repeated times";
static char __pyx_k_119[] = "There are %i dst switches when there should only be 1.";
static char __pyx_k_120[] = "Cannot infer dst time from %r, try using the 'infer_dst' argument";
static char __pyx_k_121[] = "NonExistentTimeError";
static char __pyx_k_129[] = "Field %s not supported";
static char __pyx_k_130[] = "Custom business days is not supported by %s";
static char __pyx_k_131[] = "bad month number 0; must be 1-12";
static char __pyx_k_133[] = "Unrecognized type: %s";
static char __pyx_k_135[] = "Frequency conversion failed";
static char __pyx_k_137[] = "Unable to convert to desired frequency.";
static char __pyx_k_139[] = "%Y";
static char __pyx_k_140[] = "%FQ%q";
static char __pyx_k_141[] = "%Y-%m";
static char __pyx_k_142[] = "%s/%s";
static char __pyx_k_143[] = "%Y-%m-%d";
static char __pyx_k_144[] = "%Y-%m-%d %H:00";
static char __pyx_k_145[] = "%Y-%m-%d %H:%M";
static char __pyx_k_146[] = "%Y-%m-%d %H:%M:%S";
static char __pyx_k_147[] = "%Y-%m-%d %H:%M:%S.%l";
static char __pyx_k_148[] = "%Y-%m-%d %H:%M:%S.%u";
static char __pyx_k_149[] = "%Y-%m-%d %H:%M:%S.%n";
static char __pyx_k_150[] = "Unknown freq: %d";
static char __pyx_k_151[] = "utf-8";
static char __pyx_k_153[] = "Unable to get quarter and year";
static char __pyx_k_155[] = "%d";
static char __pyx_k_156[] = "%.2d";
static char __pyx_k_157[] = "%03d";
static char __pyx_k_158[] = "%06d";
static char __pyx_k_159[] = "%09d";
static char __pyx_k_161[] = "Unrecognized period code: %d";
static char __pyx_k_162[] = "%s is wrong freq";
static char __pyx_k_163[] = "_LocaleTime__calc_weekday";
static char __pyx_k_164[] = "_LocaleTime__calc_month";
static char __pyx_k_165[] = "_LocaleTime__calc_am_pm";
static char __pyx_k_166[] = "_LocaleTime__calc_timezone";
static char __pyx_k_167[] = "_LocaleTime__calc_date_time";
static char __pyx_k_168[] = "locale changed during initialization";
static char __pyx_k_172[] = "%p";
static char __pyx_k_175[] = "%c";
static char __pyx_k_176[] = "%x";
static char __pyx_k_177[] = "%X";
static char __pyx_k_178[] = "%%";
static char __pyx_k_180[] = "%A";
static char __pyx_k_181[] = "%B";
static char __pyx_k_182[] = "%a";
static char __pyx_k_183[] = "%b";
static char __pyx_k_185[] = "%y";
static char __pyx_k_187[] = "%H";
static char __pyx_k_189[] = "%M";
static char __pyx_k_191[] = "%S";
static char __pyx_k_193[] = "%j";
static char __pyx_k_196[] = "%m";
static char __pyx_k_199[] = "%w";
static char __pyx_k_201[] = "%I";
static char __pyx_k_203[] = "%Z";
static char __pyx_k_210[] = "%W";
static char __pyx_k_211[] = "%U";
static char __pyx_k_212[] = "(?P<d>3[0-1]|[1-2]\\d|0[1-9]|[1-9]| [1-9])";
static char __pyx_k_213[] = "(?P<f>[0-9]{1,6})";
static char __pyx_k_214[] = "(?P<H>2[0-3]|[0-1]\\d|\\d)";
static char __pyx_k_215[] = "(?P<I>1[0-2]|0[1-9]|[1-9])";
static char __pyx_k_216[] = "(?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_217[] = "(?P<m>1[0-2]|0[1-9]|[1-9])";
static char __pyx_k_218[] = "(?P<M>[0-5]\\d|\\d)";
static char __pyx_k_219[] = "(?P<S>6[0-1]|[0-5]\\d|\\d)";
static char __pyx_k_220[] = "(?P<U>5[0-3]|[0-4]\\d|\\d)";
static char __pyx_k_221[] = "(?P<w>[0-6])";
static char __pyx_k_222[] = "(?P<y>\\d\\d)";
static char __pyx_k_223[] = "(?P<Y>\\d\\d\\d\\d)";
static char __pyx_k_226[] = "|";
static char __pyx_k_227[] = "(?P<%s>%s";
static char __pyx_k_228[] = "%s)";
static char __pyx_k_229[] = "([\\\\.^$*+?\\(\\){}\\[\\]|])";
static char __pyx_k_231[] = "\\\\\\1";
static char __pyx_k_232[] = "\\s+";
static char __pyx_k_235[] = "%s%s%s";
static char __pyx_k_236[] = "%s%s";
static char __pyx_k_237[] = "Unable to parse %s";
static char __pyx_k_238[] = "ndarray is not C contiguous";
static char __pyx_k_240[] = "ndarray is not Fortran contiguous";
static char __pyx_k_242[] = "Non-native byte order not supported";
static char __pyx_k_244[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_245[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_248[] = "Format string allocated too short.";
static char __pyx_k_252[] = "dateutil.tz";
static char __pyx_k_253[] = "pandas.compat";
static char __pyx_k_254[] = "distutils.version";
static char __pyx_k_255[] = "1.6";
static char __pyx_k_256[] = "_np_version_under1p6";
static char __pyx_k_257[] = "1.7";
static char __pyx_k_262[] = "/mnt/home/jreback/pandas/pandas/tslib.pyx";
static char __pyx_k_263[] = "pandas.tslib";
static char __pyx_k_340[] = "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_359[] = "(N)ot-(A)-(T)ime, the time equivalent of NaN";
static char __pyx_k_374[] = "datetime_to_datetime64";
static char __pyx_k_383[] = "array_to_timedelta64";
static char __pyx_k_386[] = "convert_to_timedelta";
static char __pyx_k_427[] = "dt64arr_to_periodarr";
static char __pyx_k_430[] = "periodarr_to_dt64arr";
static char __pyx_k_437[] = "%q";
static char __pyx_k_438[] = "^`AB`^";
static char __pyx_k_440[] = "%f";
static char __pyx_k_441[] = "^`CD`^";
static char __pyx_k_443[] = "%F";
static char __pyx_k_444[] = "^`EF`^";
static char __pyx_k_446[] = "%l";
static char __pyx_k_447[] = "^`GH`^";
static char __pyx_k_449[] = "%u";
static char __pyx_k_450[] = "^`IJ`^";
static char __pyx_k_452[] = "%n";
static char __pyx_k_453[] = "^`KL`^";
static char __pyx_k_459[] = "get_period_field_arr";
static char __pyx_k_462[] = "_thread_allocate_lock";
static char __pyx_k_478[] = "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_484[] = "whitespace_replacement";
static char __pyx_k_489[] = "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__AS[] = "AS";
static char __pyx_k__M8[] = "M8";
static char __pyx_k__MS[] = "MS";
static char __pyx_k__QS[] = "QS";
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__dom[] = "dom";
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__fix[] = "fix";
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__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__int8[] = "int8";
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__ldom[] = "ldom";
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__floor[] = "floor";
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__py_dt[] = "py_dt";
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__zeros[] = "zeros";
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____int__[] = "__int__";
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____long__[] = "__long__";
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__month_kw[] = "month_kw";
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__tzoffset[] = "tzoffset";
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__end_month[] = "end_month";
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_offset[] = "to_offset";
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__is_business[] = "is_business";
static char __pyx_k__is_year_end[] = "is_year_end";
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__start_month[] = "start_month";
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__is_month_end[] = "is_month_end";
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__OverflowError[] = "OverflowError";
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__is_year_start[] = "is_year_start";
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__startingMonth[] = "startingMonth";
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__NotImplemented[] = "NotImplemented";
static char __pyx_k____calc_weekday[] = "__calc_weekday";
static char __pyx_k____nat_unpickle[] = "__nat_unpickle";
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__is_month_start[] = "is_month_start";
static char __pyx_k__is_quarter_end[] = "is_quarter_end";
static char __pyx_k__period_ordinal[] = "period_ordinal";
static char __pyx_k__seconds_pretty[] = "seconds_pretty";
static char __pyx_k__to_julian_date[] = "to_julian_date";
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__is_quarter_start[] = "is_quarter_start";
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 char __pyx_k__get_start_end_field[] = "get_start_end_field";
static PyObject *__pyx_kp_s_10;
static PyObject *__pyx_kp_s_102;
static PyObject *__pyx_kp_s_103;
static PyObject *__pyx_n_s_105;
static PyObject *__pyx_kp_s_106;
static PyObject *__pyx_kp_s_109;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_n_s_114;
static PyObject *__pyx_kp_s_116;
static PyObject *__pyx_kp_s_118;
static PyObject *__pyx_kp_s_119;
static PyObject *__pyx_kp_s_12;
static PyObject *__pyx_kp_s_120;
static PyObject *__pyx_n_s_121;
static PyObject *__pyx_kp_s_129;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_130;
static PyObject *__pyx_kp_s_131;
static PyObject *__pyx_kp_s_133;
static PyObject *__pyx_kp_s_135;
static PyObject *__pyx_kp_s_137;
static PyObject *__pyx_kp_b_139;
static PyObject *__pyx_kp_s_139;
static PyObject *__pyx_kp_s_14;
static PyObject *__pyx_kp_b_140;
static PyObject *__pyx_kp_b_141;
static PyObject *__pyx_kp_s_142;
static PyObject *__pyx_kp_b_143;
static PyObject *__pyx_kp_b_144;
static PyObject *__pyx_kp_b_145;
static PyObject *__pyx_kp_b_146;
static PyObject *__pyx_kp_b_147;
static PyObject *__pyx_kp_b_148;
static PyObject *__pyx_kp_b_149;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_150;
static PyObject *__pyx_kp_s_151;
static PyObject *__pyx_kp_s_153;
static PyObject *__pyx_kp_s_155;
static PyObject *__pyx_kp_s_156;
static PyObject *__pyx_kp_s_157;
static PyObject *__pyx_kp_s_158;
static PyObject *__pyx_kp_s_159;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_kp_s_161;
static PyObject *__pyx_kp_s_162;
static PyObject *__pyx_n_s_163;
static PyObject *__pyx_n_s_164;
static PyObject *__pyx_n_s_165;
static PyObject *__pyx_n_s_166;
static PyObject *__pyx_n_s_167;
static PyObject *__pyx_kp_s_168;
static PyObject *__pyx_n_s_17;
static PyObject *__pyx_kp_s_172;
static PyObject *__pyx_kp_s_175;
static PyObject *__pyx_kp_s_176;
static PyObject *__pyx_kp_s_177;
static PyObject *__pyx_kp_s_178;
static PyObject *__pyx_kp_s_180;
static PyObject *__pyx_kp_s_181;
static PyObject *__pyx_kp_s_182;
static PyObject *__pyx_kp_s_183;
static PyObject *__pyx_kp_s_185;
static PyObject *__pyx_kp_s_187;
static PyObject *__pyx_kp_s_189;
static PyObject *__pyx_kp_s_191;
static PyObject *__pyx_kp_s_193;
static PyObject *__pyx_kp_s_196;
static PyObject *__pyx_kp_s_199;
static PyObject *__pyx_n_s_2;
static PyObject *__pyx_kp_s_201;
static PyObject *__pyx_kp_s_203;
static PyObject *__pyx_kp_s_21;
static PyObject *__pyx_kp_s_210;
static PyObject *__pyx_kp_s_211;
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_216;
static PyObject *__pyx_kp_s_217;
static PyObject *__pyx_kp_s_218;
static PyObject *__pyx_kp_s_219;
static PyObject *__pyx_kp_s_220;
static PyObject *__pyx_kp_s_221;
static PyObject *__pyx_kp_s_222;
static PyObject *__pyx_kp_s_223;
static PyObject *__pyx_kp_s_226;
static PyObject *__pyx_kp_s_227;
static PyObject *__pyx_kp_s_228;
static PyObject *__pyx_kp_s_229;
static PyObject *__pyx_n_s_23;
static PyObject *__pyx_kp_s_231;
static PyObject *__pyx_kp_s_232;
static PyObject *__pyx_kp_s_235;
static PyObject *__pyx_kp_s_236;
static PyObject *__pyx_kp_s_237;
static PyObject *__pyx_kp_u_238;
static PyObject *__pyx_kp_u_240;
static PyObject *__pyx_kp_u_242;
static PyObject *__pyx_kp_u_244;
static PyObject *__pyx_kp_u_245;
static PyObject *__pyx_kp_u_248;
static PyObject *__pyx_n_s_252;
static PyObject *__pyx_n_s_253;
static PyObject *__pyx_n_s_254;
static PyObject *__pyx_kp_s_255;
static PyObject *__pyx_n_s_256;
static PyObject *__pyx_kp_s_257;
static PyObject *__pyx_kp_s_262;
static PyObject *__pyx_n_s_263;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_30;
static PyObject *__pyx_kp_s_32;
static PyObject *__pyx_kp_s_34;
static PyObject *__pyx_kp_s_340;
static PyObject *__pyx_kp_s_35;
static PyObject *__pyx_kp_s_359;
static PyObject *__pyx_kp_s_37;
static PyObject *__pyx_n_s_374;
static PyObject *__pyx_kp_s_38;
static PyObject *__pyx_n_s_383;
static PyObject *__pyx_n_s_386;
static PyObject *__pyx_kp_s_39;
static PyObject *__pyx_kp_s_42;
static PyObject *__pyx_n_s_427;
static PyObject *__pyx_kp_s_43;
static PyObject *__pyx_n_s_430;
static PyObject *__pyx_kp_b_437;
static PyObject *__pyx_kp_b_438;
static PyObject *__pyx_kp_s_438;
static PyObject *__pyx_kp_b_440;
static PyObject *__pyx_kp_b_441;
static PyObject *__pyx_kp_s_441;
static PyObject *__pyx_kp_b_443;
static PyObject *__pyx_kp_b_444;
static PyObject *__pyx_kp_s_444;
static PyObject *__pyx_kp_b_446;
static PyObject *__pyx_kp_b_447;
static PyObject *__pyx_kp_s_447;
static PyObject *__pyx_kp_b_449;
static PyObject *__pyx_kp_b_450;
static PyObject *__pyx_kp_s_450;
static PyObject *__pyx_kp_b_452;
static PyObject *__pyx_kp_b_453;
static PyObject *__pyx_kp_s_453;
static PyObject *__pyx_n_s_459;
static PyObject *__pyx_kp_s_46;
static PyObject *__pyx_n_s_462;
static PyObject *__pyx_kp_s_478;
static PyObject *__pyx_n_s_484;
static PyObject *__pyx_kp_s_489;
static PyObject *__pyx_kp_s_49;
static PyObject *__pyx_n_s_51;
static PyObject *__pyx_kp_s_54;
static PyObject *__pyx_kp_s_55;
static PyObject *__pyx_kp_s_56;
static PyObject *__pyx_kp_s_58;
static PyObject *__pyx_kp_s_6;
static PyObject *__pyx_kp_s_60;
static PyObject *__pyx_kp_s_62;
static PyObject *__pyx_n_s_64;
static PyObject *__pyx_n_s_65;
static PyObject *__pyx_kp_s_66;
static PyObject *__pyx_kp_s_72;
static PyObject *__pyx_n_s_75;
static PyObject *__pyx_kp_s_76;
static PyObject *__pyx_kp_s_79;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_kp_s_83;
static PyObject *__pyx_n_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_kp_s_91;
static PyObject *__pyx_kp_s_92;
static PyObject *__pyx_kp_s_93;
static PyObject *__pyx_kp_s_94;
static PyObject *__pyx_kp_s_96;
static PyObject *__pyx_kp_s_97;
static PyObject *__pyx_kp_s_98;
static PyObject *__pyx_kp_s_99;
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__AS;
static PyObject *__pyx_n_s__AmbiguousTimeError;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_s__B;
static PyObject *__pyx_n_s__C;
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__MS;
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__NotImplemented;
static PyObject *__pyx_n_s__OutOfBoundsDatetime;
static PyObject *__pyx_n_s__OverflowError;
static PyObject *__pyx_n_s__P;
static PyObject *__pyx_n_s__Period;
static PyObject *__pyx_n_s__QS;
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____int__;
static PyObject *__pyx_n_s____long__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____nat_unpickle;
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__dom;
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__end_month;
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__fix;
static PyObject *__pyx_n_s__flat;
static PyObject *__pyx_n_s__floor;
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_start_end_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__int8;
static PyObject *__pyx_n_s__ints_to_pydatetime;
static PyObject *__pyx_n_s__iresult;
static PyObject *__pyx_n_s__is_business;
static PyObject *__pyx_n_s__is_month_end;
static PyObject *__pyx_n_s__is_month_start;
static PyObject *__pyx_n_s__is_quarter_end;
static PyObject *__pyx_n_s__is_quarter_start;
static PyObject *__pyx_n_s__is_timestamp_array;
static PyObject *__pyx_n_s__is_year_end;
static PyObject *__pyx_n_s__is_year_start;
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__ldom;
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_kw;
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__py_dt;
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__start_month;
static PyObject *__pyx_n_s__startingMonth;
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_julian_date;
static PyObject *__pyx_n_s__to_offset;
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__tzoffset;
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__zeros;
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_100;
static PyObject *__pyx_int_120;
static PyObject *__pyx_int_121;
static PyObject *__pyx_int_151;
static PyObject *__pyx_int_152;
static PyObject *__pyx_int_153;
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_400;
static PyObject *__pyx_int_457;
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_68;
static PyObject *__pyx_k_69;
static PyObject *__pyx_k_70;
static PyObject *__pyx_k_78;
static PyObject *__pyx_k_81;
static PyObject *__pyx_k_95;
static PyObject *__pyx_k_tuple_1;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_18;
static PyObject *__pyx_k_tuple_19;
static PyObject *__pyx_k_tuple_20;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_24;
static PyObject *__pyx_k_tuple_25;
static PyObject *__pyx_k_tuple_26;
static PyObject *__pyx_k_tuple_27;
static PyObject *__pyx_k_tuple_28;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_33;
static PyObject *__pyx_k_tuple_36;
static PyObject *__pyx_k_tuple_40;
static PyObject *__pyx_k_tuple_41;
static PyObject *__pyx_k_tuple_44;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_47;
static PyObject *__pyx_k_tuple_48;
static PyObject *__pyx_k_tuple_50;
static PyObject *__pyx_k_tuple_52;
static PyObject *__pyx_k_tuple_53;
static PyObject *__pyx_k_tuple_57;
static PyObject *__pyx_k_tuple_59;
static PyObject *__pyx_k_tuple_61;
static PyObject *__pyx_k_tuple_63;
static PyObject *__pyx_k_tuple_67;
static PyObject *__pyx_k_tuple_71;
static PyObject *__pyx_k_tuple_73;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_77;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_82;
static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_100;
static PyObject *__pyx_k_tuple_101;
static PyObject *__pyx_k_tuple_104;
static PyObject *__pyx_k_tuple_107;
static PyObject *__pyx_k_tuple_108;
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_115;
static PyObject *__pyx_k_tuple_117;
static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_123;
static PyObject *__pyx_k_tuple_124;
static PyObject *__pyx_k_tuple_125;
static PyObject *__pyx_k_tuple_126;
static PyObject *__pyx_k_tuple_127;
static PyObject *__pyx_k_tuple_128;
static PyObject *__pyx_k_tuple_132;
static PyObject *__pyx_k_tuple_134;
static PyObject *__pyx_k_tuple_136;
static PyObject *__pyx_k_tuple_138;
static PyObject *__pyx_k_tuple_152;
static PyObject *__pyx_k_tuple_154;
static PyObject *__pyx_k_tuple_160;
static PyObject *__pyx_k_tuple_169;
static PyObject *__pyx_k_tuple_170;
static PyObject *__pyx_k_tuple_171;
static PyObject *__pyx_k_tuple_173;
static PyObject *__pyx_k_tuple_174;
static PyObject *__pyx_k_tuple_179;
static PyObject *__pyx_k_tuple_184;
static PyObject *__pyx_k_tuple_186;
static PyObject *__pyx_k_tuple_188;
static PyObject *__pyx_k_tuple_190;
static PyObject *__pyx_k_tuple_192;
static PyObject *__pyx_k_tuple_194;
static PyObject *__pyx_k_tuple_195;
static PyObject *__pyx_k_tuple_197;
static PyObject *__pyx_k_tuple_198;
static PyObject *__pyx_k_tuple_200;
static PyObject *__pyx_k_tuple_202;
static PyObject *__pyx_k_tuple_204;
static PyObject *__pyx_k_tuple_205;
static PyObject *__pyx_k_tuple_206;
static PyObject *__pyx_k_tuple_207;
static PyObject *__pyx_k_tuple_208;
static PyObject *__pyx_k_tuple_209;
static PyObject *__pyx_k_tuple_224;
static PyObject *__pyx_k_tuple_225;
static PyObject *__pyx_k_tuple_230;
static PyObject *__pyx_k_tuple_233;
static PyObject *__pyx_k_tuple_234;
static PyObject *__pyx_k_tuple_239;
static PyObject *__pyx_k_tuple_241;
static PyObject *__pyx_k_tuple_243;
static PyObject *__pyx_k_tuple_246;
static PyObject *__pyx_k_tuple_247;
static PyObject *__pyx_k_tuple_249;
static PyObject *__pyx_k_tuple_250;
static PyObject *__pyx_k_tuple_251;
static PyObject *__pyx_k_tuple_258;
static PyObject *__pyx_k_tuple_259;
static PyObject *__pyx_k_tuple_260;
static PyObject *__pyx_k_tuple_264;
static PyObject *__pyx_k_tuple_266;
static PyObject *__pyx_k_tuple_268;
static PyObject *__pyx_k_tuple_269;
static PyObject *__pyx_k_tuple_271;
static PyObject *__pyx_k_tuple_272;
static PyObject *__pyx_k_tuple_274;
static PyObject *__pyx_k_tuple_275;
static PyObject *__pyx_k_tuple_277;
static PyObject *__pyx_k_tuple_279;
static PyObject *__pyx_k_tuple_281;
static PyObject *__pyx_k_tuple_282;
static PyObject *__pyx_k_tuple_284;
static PyObject *__pyx_k_tuple_286;
static PyObject *__pyx_k_tuple_288;
static PyObject *__pyx_k_tuple_290;
static PyObject *__pyx_k_tuple_292;
static PyObject *__pyx_k_tuple_294;
static PyObject *__pyx_k_tuple_296;
static PyObject *__pyx_k_tuple_298;
static PyObject *__pyx_k_tuple_300;
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_311;
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_325;
static PyObject *__pyx_k_tuple_327;
static PyObject *__pyx_k_tuple_329;
static PyObject *__pyx_k_tuple_331;
static PyObject *__pyx_k_tuple_333;
static PyObject *__pyx_k_tuple_335;
static PyObject *__pyx_k_tuple_336;
static PyObject *__pyx_k_tuple_338;
static PyObject *__pyx_k_tuple_341;
static PyObject *__pyx_k_tuple_343;
static PyObject *__pyx_k_tuple_345;
static PyObject *__pyx_k_tuple_347;
static PyObject *__pyx_k_tuple_349;
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_360;
static PyObject *__pyx_k_tuple_362;
static PyObject *__pyx_k_tuple_364;
static PyObject *__pyx_k_tuple_366;
static PyObject *__pyx_k_tuple_368;
static PyObject *__pyx_k_tuple_370;
static PyObject *__pyx_k_tuple_372;
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_384;
static PyObject *__pyx_k_tuple_387;
static PyObject *__pyx_k_tuple_389;
static PyObject *__pyx_k_tuple_391;
static PyObject *__pyx_k_tuple_393;
static PyObject *__pyx_k_tuple_395;
static PyObject *__pyx_k_tuple_397;
static PyObject *__pyx_k_tuple_399;
static PyObject *__pyx_k_tuple_401;
static PyObject *__pyx_k_tuple_403;
static PyObject *__pyx_k_tuple_405;
static PyObject *__pyx_k_tuple_407;
static PyObject *__pyx_k_tuple_409;
static PyObject *__pyx_k_tuple_411;
static PyObject *__pyx_k_tuple_413;
static PyObject *__pyx_k_tuple_415;
static PyObject *__pyx_k_tuple_417;
static PyObject *__pyx_k_tuple_419;
static PyObject *__pyx_k_tuple_421;
static PyObject *__pyx_k_tuple_423;
static PyObject *__pyx_k_tuple_425;
static PyObject *__pyx_k_tuple_428;
static PyObject *__pyx_k_tuple_431;
static PyObject *__pyx_k_tuple_433;
static PyObject *__pyx_k_tuple_435;
static PyObject *__pyx_k_tuple_439;
static PyObject *__pyx_k_tuple_442;
static PyObject *__pyx_k_tuple_445;
static PyObject *__pyx_k_tuple_448;
static PyObject *__pyx_k_tuple_451;
static PyObject *__pyx_k_tuple_454;
static PyObject *__pyx_k_tuple_455;
static PyObject *__pyx_k_tuple_457;
static PyObject *__pyx_k_tuple_460;
static PyObject *__pyx_k_tuple_464;
static PyObject *__pyx_k_tuple_466;
static PyObject *__pyx_k_tuple_468;
static PyObject *__pyx_k_tuple_470;
static PyObject *__pyx_k_tuple_472;
static PyObject *__pyx_k_tuple_474;
static PyObject *__pyx_k_tuple_476;
static PyObject *__pyx_k_tuple_479;
static PyObject *__pyx_k_tuple_481;
static PyObject *__pyx_k_tuple_482;
static PyObject *__pyx_k_tuple_485;
static PyObject *__pyx_k_tuple_487;
static PyObject *__pyx_k_tuple_490;
static PyObject *__pyx_k_codeobj_261;
static PyObject *__pyx_k_codeobj_265;
static PyObject *__pyx_k_codeobj_267;
static PyObject *__pyx_k_codeobj_270;
static PyObject *__pyx_k_codeobj_273;
static PyObject *__pyx_k_codeobj_276;
static PyObject *__pyx_k_codeobj_278;
static PyObject *__pyx_k_codeobj_280;
static PyObject *__pyx_k_codeobj_283;
static PyObject *__pyx_k_codeobj_285;
static PyObject *__pyx_k_codeobj_287;
static PyObject *__pyx_k_codeobj_289;
static PyObject *__pyx_k_codeobj_291;
static PyObject *__pyx_k_codeobj_293;
static PyObject *__pyx_k_codeobj_295;
static PyObject *__pyx_k_codeobj_297;
static PyObject *__pyx_k_codeobj_299;
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_310;
static PyObject *__pyx_k_codeobj_312;
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_326;
static PyObject *__pyx_k_codeobj_328;
static PyObject *__pyx_k_codeobj_330;
static PyObject *__pyx_k_codeobj_332;
static PyObject *__pyx_k_codeobj_334;
static PyObject *__pyx_k_codeobj_337;
static PyObject *__pyx_k_codeobj_339;
static PyObject *__pyx_k_codeobj_342;
static PyObject *__pyx_k_codeobj_344;
static PyObject *__pyx_k_codeobj_346;
static PyObject *__pyx_k_codeobj_348;
static PyObject *__pyx_k_codeobj_350;
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_361;
static PyObject *__pyx_k_codeobj_363;
static PyObject *__pyx_k_codeobj_365;
static PyObject *__pyx_k_codeobj_367;
static PyObject *__pyx_k_codeobj_369;
static PyObject *__pyx_k_codeobj_371;
static PyObject *__pyx_k_codeobj_373;
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_385;
static PyObject *__pyx_k_codeobj_388;
static PyObject *__pyx_k_codeobj_390;
static PyObject *__pyx_k_codeobj_392;
static PyObject *__pyx_k_codeobj_394;
static PyObject *__pyx_k_codeobj_396;
static PyObject *__pyx_k_codeobj_398;
static PyObject *__pyx_k_codeobj_400;
static PyObject *__pyx_k_codeobj_402;
static PyObject *__pyx_k_codeobj_404;
static PyObject *__pyx_k_codeobj_406;
static PyObject *__pyx_k_codeobj_408;
static PyObject *__pyx_k_codeobj_410;
static PyObject *__pyx_k_codeobj_412;
static PyObject *__pyx_k_codeobj_414;
static PyObject *__pyx_k_codeobj_416;
static PyObject *__pyx_k_codeobj_418;
static PyObject *__pyx_k_codeobj_420;
static PyObject *__pyx_k_codeobj_422;
static PyObject *__pyx_k_codeobj_424;
static PyObject *__pyx_k_codeobj_426;
static PyObject *__pyx_k_codeobj_429;
static PyObject *__pyx_k_codeobj_432;
static PyObject *__pyx_k_codeobj_434;
static PyObject *__pyx_k_codeobj_436;
static PyObject *__pyx_k_codeobj_456;
static PyObject *__pyx_k_codeobj_458;
static PyObject *__pyx_k_codeobj_461;
static PyObject *__pyx_k_codeobj_463;
static PyObject *__pyx_k_codeobj_465;
static PyObject *__pyx_k_codeobj_467;
static PyObject *__pyx_k_codeobj_469;
static PyObject *__pyx_k_codeobj_471;
static PyObject *__pyx_k_codeobj_473;
static PyObject *__pyx_k_codeobj_475;
static PyObject *__pyx_k_codeobj_477;
static PyObject *__pyx_k_codeobj_480;
static PyObject *__pyx_k_codeobj_483;
static PyObject *__pyx_k_codeobj_486;
static PyObject *__pyx_k_codeobj_488;
static PyObject *__pyx_k_codeobj_491;

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_104lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_104lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_5tslib_104lambda1, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_104lambda1(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":484
 *           '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":74
 *     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 = 74; __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 = 74; __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 = 74; __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 = 74; __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":76
 * 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 = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":78
 *         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 = 78; __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 = 78; __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 = 78; __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 = 78; __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 = 78; __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 = 78; __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 = 78; __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 = 78; __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 = 78; __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":80
 *         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":81
 * 
 *     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":82
 *     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":83
 *         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 = 83; __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 = 83; __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 = 83; __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 = 83; __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 = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_7) {

          /* "pandas/tslib.pyx":84
 *             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 = 84; __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 = 84; __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 = 84; __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":86
 *                     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 = 86; __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":87
 *                 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 = 87; __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 = 87; __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 = 87; __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 = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);

          /* "pandas/tslib.pyx":88
 *                     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 = 88; __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 = 88; __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 = 88; __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 = 87; __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 = 87; __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":87
 *                 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 = 87; __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":89
 *                     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 = 89; __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 = 89; __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 = 89; __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 = 89; __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 = 89; __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 = 89; __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 = 89; __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 = 89; __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":90
 *                                          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":91
 *         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 = 91; __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 = 91; __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 = 91; __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 = 91; __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 = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (__pyx_t_20) {

          /* "pandas/tslib.pyx":92
 *             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 = 92; __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 = 92; __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 = 92; __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":94
 *                     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 = 94; __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":95
 *                 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 = 95; __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 = 95; __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 = 95; __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 = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);

          /* "pandas/tslib.pyx":96
 *                     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 = 96; __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 = 96; __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 = 96; __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 = 95; __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 = 95; __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":97
 *                     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 = 97; __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 = 97; __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 = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_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 = 97; __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 = 97; __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":99
 *                     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 = 99; __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 = 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_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); 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_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":100
 *         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 = 100; __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 = 100; __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 = 100; __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":101
 *             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":103
 *             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 = 103; __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 = 103; __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 = 103; __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 = 103; __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 = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_20) {

          /* "pandas/tslib.pyx":104
 * 
 *                 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 = 104; __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 = 104; __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 = 104; __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":108
 * 
 *                     # 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 = 108; __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 = 108; __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 = 108; __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 = 108; __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 = 108; __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 = 108; __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":109
 *                     # 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 = 109; __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 = 109; __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":111
 *                     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 = 111; __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 = 111; __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 = 111; __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 = 111; __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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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,
 */
          pandas_datetime_to_datetimestruct(__pyx_t_29, PANDAS_FR_ns, (&__pyx_v_dts));

          /* "pandas/tslib.pyx":113
 *                     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 = 113; __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 = 113; __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 = 113; __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 = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);

          /* "pandas/tslib.pyx":114
 *                                                       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 = 114; __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 = 114; __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 = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);

          /* "pandas/tslib.pyx":115
 *                     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 = 115; __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 = 115; __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 = 113; __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 = 113; __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":113
 *                     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 = 113; __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":117
 *                                          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":118
 *     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 = 118; __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 = 118; __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 = 118; __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 = 118; __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 = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (__pyx_t_20) {

        /* "pandas/tslib.pyx":119
 *         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 = 119; __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 = 119; __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 = 119; __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":121
 *                 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 = 121; __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":122
 *             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 = 122; __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 = 122; __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 = 122; __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 = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_16);

        /* "pandas/tslib.pyx":123
 *                 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 = 123; __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 = 123; __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 = 123; __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 = 122; __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 = 122; __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":122
 *             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 = 122; __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":125
 *                                      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":129
 * 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":130
 * 
 * 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 = 130; __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 = 130; __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 = 130; __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":132
 *     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":133
 * 
 * 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":134
 * 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 = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pandas/tslib.pyx":135
 *     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 = 135; __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":136
 *         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 = 136; __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":137
 *         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 = 137; __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":151
 * 
 *     @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 = 151; __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 = 151; __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 = 151; __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":154
 *         """ 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 = 154; __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 = 154; __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 = 154; __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 = 154; __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 = 154; __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 = 154; __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 = 154; __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 = 154; __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":157
 * 
 *     @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 = 157; __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 = 157; __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":159
 *     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 = 159; __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 = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":160
 *         """ 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 = 160; __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 = 160; __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 = 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_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); 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_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":161
 *         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 = 161; __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 = 161; __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 = 161; __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 = 161; __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 = 161; __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":164
 * 
 *     @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":166
 *     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 = 166; __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 = 166; __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 = 166; __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 = 166; __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":169
 * 
 *     @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":170
 *     @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 = 170; __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 = 170; __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":172
 *         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 = 172; __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 = 172; __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 = 172; __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_v_to_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;
  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);
  __Pyx_INCREF(__pyx_v_offset);

  /* "pandas/tslib.pyx":176
 *         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":177
 * 
 *         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":178
 *         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 = 178; __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 = 178; __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 = 178; __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":179
 *             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":182
 *                 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 = 182; __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 = 182; __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":184
 *         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":185
 * 
 *         if ts.value == NPY_NAT:
 *             return NaT             # <<<<<<<<<<<<<<
 * 
 *         if util.is_string_object(offset):
 */
    __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 = 185; __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
 *             return NaT
 * 
 *         if util.is_string_object(offset):             # <<<<<<<<<<<<<<
 *             from pandas.tseries.frequencies import to_offset
 *             offset = to_offset(offset)
 */
  __pyx_t_1 = is_string_object(__pyx_v_offset);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":188
 * 
 *         if util.is_string_object(offset):
 *             from pandas.tseries.frequencies import to_offset             # <<<<<<<<<<<<<<
 *             offset = to_offset(offset)
 * 
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__to_offset));
    PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__to_offset));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__to_offset));
    __pyx_t_6 = __Pyx_Import(((PyObject *)__pyx_n_s_2), ((PyObject *)__pyx_t_7), -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__to_offset);
    if (__pyx_t_7 == NULL) {
      if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__to_offset);
      if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_v_to_offset = __pyx_t_7;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/tslib.pyx":189
 *         if util.is_string_object(offset):
 *             from pandas.tseries.frequencies import to_offset
 *             offset = to_offset(offset)             # <<<<<<<<<<<<<<
 * 
 *         # make datetime happy
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_offset);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_offset);
    __Pyx_GIVEREF(__pyx_v_offset);
    __pyx_t_7 = PyObject_Call(__pyx_v_to_offset, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_v_offset);
    __pyx_v_offset = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "pandas/tslib.pyx":192
 * 
 *         # 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 = 192; __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 = 192; __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 = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "pandas/tslib.pyx":193
 *         # 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 = 193; __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 = 193; __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 = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);

  /* "pandas/tslib.pyx":194
 *         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 = 194; __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 = 194; __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 = 192; __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 = 192; __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 = 192; __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":197
 * 
 *         # 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":198
 *         # 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":199
 *         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":201
 *         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_to_offset);
  __Pyx_XDECREF(__pyx_v_ts_input);
  __Pyx_XDECREF(__pyx_v_offset);
  __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":203
 *         return ts_base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         stamp = 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_stamp = NULL;
  PyObject *__pyx_v_zone = NULL;
  PyObject *__pyx_v_year2000 = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_offset = 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_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "pandas/tslib.pyx":204
 * 
 *     def __repr__(self):
 *         stamp = 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 = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_stamp = __pyx_t_1;
  __pyx_t_1 = 0;

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

  /* "pandas/tslib.pyx":207
 *         zone = None
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             stamp += 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":208
 * 
 *         try:
 *             stamp += 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 = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __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_stamp, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __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_stamp);
      __pyx_v_stamp = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":209
 *         try:
 *             stamp += 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 = 209; __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 = 209; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "pandas/tslib.pyx":210
 *             stamp += 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 = 210; __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 = 210; __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":211
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             year2000 = self.replace(year=2000)
 *             stamp += 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 = 211; __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":212
 *                 zone = _get_zone(self.tzinfo)
 *         except ValueError:
 *             year2000 = self.replace(year=2000)             # <<<<<<<<<<<<<<
 *             stamp += 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 = 212; __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 = 212; __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 = 212; __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 = 212; __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":213
 *         except ValueError:
 *             year2000 = self.replace(year=2000)
 *             stamp += 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 = 213; __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_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __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_stamp, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __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_stamp);
      __pyx_v_stamp = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "pandas/tslib.pyx":214
 *             year2000 = self.replace(year=2000)
 *             stamp += 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 = 214; __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 = 214; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_6) {

        /* "pandas/tslib.pyx":215
 *             stamp += 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 = 215; __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 = 215; __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":217
 *                 zone = _get_zone(self.tzinfo)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             stamp += 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":218
 * 
 *         try:
 *             stamp += 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 = 218; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __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_stamp, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __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_stamp);
      __pyx_v_stamp = __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":219
 *         try:
 *             stamp += zone.strftime(' %%Z')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    /*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":222
 *             pass
 * 
 *         tz = ", tz='{0}'".format(zone) if zone is not None and not isinstance(zone, tzoffset) else ""             # <<<<<<<<<<<<<<
 *         offset = ", offset='{0}'".format(self.offset.freqstr) if self.offset is not None else ""
 * 
 */
  __pyx_t_6 = (__pyx_v_zone != Py_None);
  if (__pyx_t_6) {
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tzoffset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = PyObject_IsInstance(__pyx_v_zone, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = (!__pyx_t_12);
    __pyx_t_12 = __pyx_t_13;
  } else {
    __pyx_t_12 = __pyx_t_6;
  }
  if (__pyx_t_12) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_8), __pyx_n_s__format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_zone);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_zone);
    __Pyx_GIVEREF(__pyx_v_zone);
    __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_8 = __pyx_t_10;
    __pyx_t_10 = 0;
  } else {
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
    __pyx_t_8 = ((PyObject *)__pyx_kp_s_9);
  }
  __pyx_v_tz = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pandas/tslib.pyx":223
 * 
 *         tz = ", tz='{0}'".format(zone) if zone is not None and not isinstance(zone, tzoffset) else ""
 *         offset = ", offset='{0}'".format(self.offset.freqstr) if self.offset is not None else ""             # <<<<<<<<<<<<<<
 * 
 *         return "Timestamp('{stamp}'{tz}{offset})".format(stamp=stamp, tz=tz, offset=offset)
 */
  __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_12 = (__pyx_t_10 != Py_None);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_12) {
    __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_10), __pyx_n_s__format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__freqstr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_t_8 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
    __pyx_t_8 = ((PyObject *)__pyx_kp_s_9);
  }
  __pyx_v_offset = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pandas/tslib.pyx":225
 *         offset = ", offset='{0}'".format(self.offset.freqstr) if self.offset is not None else ""
 * 
 *         return "Timestamp('{stamp}'{tz}{offset})".format(stamp=stamp, tz=tz, offset=offset)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_11), __pyx_n_s__format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__stamp), __pyx_v_stamp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__tz), __pyx_v_tz) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__offset), __pyx_v_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_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_stamp);
  __Pyx_XDECREF(__pyx_v_zone);
  __Pyx_XDECREF(__pyx_v_year2000);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_offset);
  __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":228
 * 
 *     @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":231
 *         # 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 = 231; __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 = 231; __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 = 231; __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 = 231; __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_12), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __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":234
 * 
 *     @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":235
 *     @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 = 235; __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 = 235; __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 = 235; __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 = 235; __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_13), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __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":237
 *         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 = 237; __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 = 237; __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 = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":238
 * 
 *         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 = 238; __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 = 238; __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 = 238; __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 = 238; __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":239
 *         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_14), __pyx_v_nanos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __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 = 239; __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":240
 *             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 = 240; __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 = 240; __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 = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":241
 *             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 = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __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 = 241; __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":243
 *             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":246
 * 
 *     @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":247
 *     @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 = 247; __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 = 247; __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 = 247; __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_16), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __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":250
 * 
 *     @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":254
 *         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 = 254; __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":257
 * 
 *     @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":258
 *     @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 = 258; __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 = 260; __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 = 260; __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 = 260; __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":260
 *         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":261
 * 
 *     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 = 261; __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 = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":262
 *     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 = 262; __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 = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":263
 *         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 = 263; __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 = 263; __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":265
 *         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":266
 * 
 *     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 = 266; __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 = 266; __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 = 266; __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 = 266; __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":267
 *     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 = 267; __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 = 267; __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":269
 *         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 = 269; __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 = 269; __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":273
 *         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 = 273; __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_17), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __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 = 273; __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":275
 *         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":276
 * 
 *         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 = 276; __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":278
 *             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 = 278; __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 = 278; __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 = 278; __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 = 278; __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":281
 * 
 *     @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":282
 *     @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 = 282; __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 = 282; __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":285
 * 
 *     @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":286
 *     @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 = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __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":289
 * 
 *     @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":290
 *     @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 = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __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":295
 * 
 *     @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":296
 *     @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 = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __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":299
 * 
 *     @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":300
 *     @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 = 300; __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 = 300; __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 = 300; __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":303
 * 
 *     @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":304
 *     @property
 *     def asm8(self):
 *         return np.int64(self.value).view('M8[ns]')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __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 = 304; __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 = 304; __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 = 304; __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 = 304; __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 = 304; __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 = 304; __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_22), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __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_41is_month_start(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_41is_month_start = {__Pyx_NAMESTR("is_month_start"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_41is_month_start, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_41is_month_start(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_month_start (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_40is_month_start(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":307
 * 
 *     @property
 *     def is_month_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_month_start')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_40is_month_start(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("is_month_start", 0);

  /* "pandas/tslib.pyx":308
 *     @property
 *     def is_month_start(self):
 *         return self._get_start_end_field('is_month_start')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_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.is_month_start", __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_43is_month_end(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_43is_month_end = {__Pyx_NAMESTR("is_month_end"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_43is_month_end, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_43is_month_end(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_month_end (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_42is_month_end(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":311
 * 
 *     @property
 *     def is_month_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_month_end')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_42is_month_end(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("is_month_end", 0);

  /* "pandas/tslib.pyx":312
 *     @property
 *     def is_month_end(self):
 *         return self._get_start_end_field('is_month_end')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_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.is_month_end", __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_45is_quarter_start(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_45is_quarter_start = {__Pyx_NAMESTR("is_quarter_start"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_45is_quarter_start, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_45is_quarter_start(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_quarter_start (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_44is_quarter_start(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":315
 * 
 *     @property
 *     def is_quarter_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_quarter_start')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_44is_quarter_start(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("is_quarter_start", 0);

  /* "pandas/tslib.pyx":316
 *     @property
 *     def is_quarter_start(self):
 *         return self._get_start_end_field('is_quarter_start')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __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.is_quarter_start", __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_47is_quarter_end(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_47is_quarter_end = {__Pyx_NAMESTR("is_quarter_end"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_47is_quarter_end, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_47is_quarter_end(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_quarter_end (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_46is_quarter_end(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":319
 * 
 *     @property
 *     def is_quarter_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_quarter_end')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_46is_quarter_end(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("is_quarter_end", 0);

  /* "pandas/tslib.pyx":320
 *     @property
 *     def is_quarter_end(self):
 *         return self._get_start_end_field('is_quarter_end')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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.is_quarter_end", __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_49is_year_start(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_49is_year_start = {__Pyx_NAMESTR("is_year_start"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_49is_year_start, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_49is_year_start(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_year_start (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_48is_year_start(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":323
 * 
 *     @property
 *     def is_year_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_year_start')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_48is_year_start(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("is_year_start", 0);

  /* "pandas/tslib.pyx":324
 *     @property
 *     def is_year_start(self):
 *         return self._get_start_end_field('is_year_start')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_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.is_year_start", __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_51is_year_end(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_51is_year_end = {__Pyx_NAMESTR("is_year_end"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_51is_year_end, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_51is_year_end(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_year_end (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_50is_year_end(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":327
 * 
 *     @property
 *     def is_year_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_year_end')
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_50is_year_end(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("is_year_end", 0);

  /* "pandas/tslib.pyx":328
 *     @property
 *     def is_year_end(self):
 *         return self._get_start_end_field('is_year_end')             # <<<<<<<<<<<<<<
 * 
 *     def tz_localize(self, tz):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __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.is_year_end", __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_53tz_localize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_52tz_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_53tz_localize = {__Pyx_NAMESTR("tz_localize"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_53tz_localize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_52tz_localize)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_53tz_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 = 330; __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 = 330; __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 = 330; __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_52tz_localize(__pyx_self, __pyx_v_self, __pyx_v_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":330
 *         return self._get_start_end_field('is_year_end')
 * 
 *     def tz_localize(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert naive Timestamp to local time zone
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_52tz_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":342
 *         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 = 342; __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":344
 *         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 = 344; __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 = 344; __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 = 344; __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 = 344; __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 = 344; __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 = 344; __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 = 344; __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":346
 *             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_31), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __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 = 346; __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_55tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_54tz_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_55tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_55tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_54tz_convert)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_55tz_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 = 349; __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 = 349; __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 = 349; __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_54tz_convert(__pyx_self, __pyx_v_self, __pyx_v_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":349
 *                             '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_54tz_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":362
 *         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 = 362; __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":364
 *         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_33), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __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 = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":368
 *         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 = 368; __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 = 368; __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 = 368; __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 = 368; __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 = 368; __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 = 368; __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_57replace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_57replace = {__Pyx_NAMESTR("replace"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_57replace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_57replace(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 = 372; __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 = 372; __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_56replace(__pyx_self, __pyx_v_self, __pyx_v_kwds);
  __Pyx_XDECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_56replace(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":373
 * 
 *     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 = 373; __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 = 373; __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 = 373; __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 = 373; __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 = 373; __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 = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "pandas/tslib.pyx":374
 *     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 = 374; __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 = 373; __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 = 373; __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":376
 *                          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_66__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 = 376; __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_59to_pydatetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_58to_pydatetime[] = "\n        If warn=True, issue warning if nanoseconds is nonzero\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_59to_pydatetime = {__Pyx_NAMESTR("to_pydatetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_59to_pydatetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_58to_pydatetime)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_59to_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 = 376; __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 = 376; __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_58to_pydatetime(__pyx_self, __pyx_v_self, __pyx_v_warn);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_58to_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":384
 *             _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 = 384; __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 = 384; __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 = 384; __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 = 384; __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":385
 * 
 *         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_34)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":386
 *         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 = 386; __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 = 386; __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 = 386; __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":388
 *         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 = 388; __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 = 388; __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 = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "pandas/tslib.pyx":389
 * 
 *         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 = 389; __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 = 389; __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 = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "pandas/tslib.pyx":390
 *         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 = 390; __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 = 388; __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 = 388; __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_61isoformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_61isoformat = {__Pyx_NAMESTR("isoformat"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_61isoformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_61isoformat(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 = 392; __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 = 392; __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_60isoformat(__pyx_self, __pyx_v_self, __pyx_v_sep);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":392
 *                         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_60isoformat(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":393
 * 
 *     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 = 393; __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 = 393; __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 = 393; __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 = 393; __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 = 393; __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 = 393; __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":394
 *     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 = 394; __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 = 394; __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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":395
 *         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":397
 *             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 = 397; __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":398
 * 
 *         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 = 398; __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 = 398; __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":400
 *             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_9);
    __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":402
 *             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 = 402; __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 = 402; __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 = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":403
 * 
 *         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 = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_35), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __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 = 403; __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":405
 *             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 = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __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 = 405; __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":407
 *             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 = 407; __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_63_has_time_component(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_62_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_63_has_time_component = {__Pyx_NAMESTR("_has_time_component"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_63_has_time_component, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_62_has_time_component)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_63_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_62_has_time_component(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_62_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":414
 *         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":415
 *         """
 *         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 = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/tslib.pyx":414
 *         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 = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":415
 *         """
 *         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 = 415; __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 = 414; __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 = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

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

    /* "pandas/tslib.pyx":415
 *         """
 *         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 = 415; __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 = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_4) {
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":416
 *         return (self.time() != _zero_time
 *                 or self.tzinfo is not None
 *                 or self.nanosecond != 0)             # <<<<<<<<<<<<<<
 * 
 *     def to_julian_date(self):
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); 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_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 = 416; __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_9Timestamp_65to_julian_date(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_6pandas_5tslib_9Timestamp_64to_julian_date[] = "\n        Convert TimeStamp to a Julian Date.\n        0 Julian date is noon January 1, 4713 BC.\n        ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_9Timestamp_65to_julian_date = {__Pyx_NAMESTR("to_julian_date"), (PyCFunction)__pyx_pw_6pandas_5tslib_9Timestamp_65to_julian_date, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_9Timestamp_64to_julian_date)};
static PyObject *__pyx_pw_6pandas_5tslib_9Timestamp_65to_julian_date(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_julian_date (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_9Timestamp_64to_julian_date(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":418
 *                 or self.nanosecond != 0)
 * 
 *     def to_julian_date(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert TimeStamp to a Julian Date.
 */

static PyObject *__pyx_pf_6pandas_5tslib_9Timestamp_64to_julian_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_month = NULL;
  PyObject *__pyx_v_day = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_julian_date", 0);

  /* "pandas/tslib.pyx":423
 *         0 Julian date is noon January 1, 4713 BC.
 *         """
 *         year = self.year             # <<<<<<<<<<<<<<
 *         month = self.month
 *         day = self.day
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_year = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":424
 *         """
 *         year = self.year
 *         month = self.month             # <<<<<<<<<<<<<<
 *         day = self.day
 *         if month <= 2:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_month = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":425
 *         year = self.year
 *         month = self.month
 *         day = self.day             # <<<<<<<<<<<<<<
 *         if month <= 2:
 *             year -= 1
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_day = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":426
 *         month = self.month
 *         day = self.day
 *         if month <= 2:             # <<<<<<<<<<<<<<
 *             year -= 1
 *             month += 12
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __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 = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":427
 *         day = self.day
 *         if month <= 2:
 *             year -= 1             # <<<<<<<<<<<<<<
 *             month += 12
 *         return (day +
 */
    __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_year, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_year);
    __pyx_v_year = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":428
 *         if month <= 2:
 *             year -= 1
 *             month += 12             # <<<<<<<<<<<<<<
 *         return (day +
 *                 np.fix((153*month - 457)/5) +
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_month, __pyx_int_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_month);
    __pyx_v_month = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":429
 *             year -= 1
 *             month += 12
 *         return (day +             # <<<<<<<<<<<<<<
 *                 np.fix((153*month - 457)/5) +
 *                 365*year +
 */
  __Pyx_XDECREF(__pyx_r);

  /* "pandas/tslib.pyx":430
 *             month += 12
 *         return (day +
 *                 np.fix((153*month - 457)/5) +             # <<<<<<<<<<<<<<
 *                 365*year +
 *                 np.floor(year / 4) -
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__fix); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_int_153, __pyx_v_month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_int_457); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __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_PyNumber_Divide(__pyx_t_4, __pyx_int_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __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(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __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_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_v_day, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":431
 *         return (day +
 *                 np.fix((153*month - 457)/5) +
 *                 365*year +             # <<<<<<<<<<<<<<
 *                 np.floor(year / 4) -
 *                 np.floor(year / 100) +
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_int_365, __pyx_v_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":432
 *                 np.fix((153*month - 457)/5) +
 *                 365*year +
 *                 np.floor(year / 4) -             # <<<<<<<<<<<<<<
 *                 np.floor(year / 100) +
 *                 np.floor(year / 400) +
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__floor); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __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_PyNumber_Divide(__pyx_v_year, __pyx_int_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":433
 *                 365*year +
 *                 np.floor(year / 4) -
 *                 np.floor(year / 100) +             # <<<<<<<<<<<<<<
 *                 np.floor(year / 400) +
 *                 1721118.5 +
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__floor); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_year, __pyx_int_100); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __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 = 433; __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(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __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_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":434
 *                 np.floor(year / 4) -
 *                 np.floor(year / 100) +
 *                 np.floor(year / 400) +             # <<<<<<<<<<<<<<
 *                 1721118.5 +
 *                 (self.hour +
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__floor); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_year, __pyx_int_400); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __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 = 434; __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_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __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_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":435
 *                 np.floor(year / 100) +
 *                 np.floor(year / 400) +
 *                 1721118.5 +             # <<<<<<<<<<<<<<
 *                 (self.hour +
 *                  self.minute/60.0 +
 */
  __pyx_t_1 = PyFloat_FromDouble(1721118.5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":436
 *                 np.floor(year / 400) +
 *                 1721118.5 +
 *                 (self.hour +             # <<<<<<<<<<<<<<
 *                  self.minute/60.0 +
 *                  self.second/3600.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 = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/tslib.pyx":437
 *                 1721118.5 +
 *                 (self.hour +
 *                  self.minute/60.0 +             # <<<<<<<<<<<<<<
 *                  self.second/3600.0 +
 *                  self.microsecond/3600.0/1e+6 +
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__minute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyFloat_FromDouble(60.0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":438
 *                 (self.hour +
 *                  self.minute/60.0 +
 *                  self.second/3600.0 +             # <<<<<<<<<<<<<<
 *                  self.microsecond/3600.0/1e+6 +
 *                  self.nanosecond/3600.0/1e+9
 */
  __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__second); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyFloat_FromDouble(3600.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":439
 *                  self.minute/60.0 +
 *                  self.second/3600.0 +
 *                  self.microsecond/3600.0/1e+6 +             # <<<<<<<<<<<<<<
 *                  self.nanosecond/3600.0/1e+9
 *                 )/24.0)
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__microsecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyFloat_FromDouble(3600.0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(1e+6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __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_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":440
 *                  self.second/3600.0 +
 *                  self.microsecond/3600.0/1e+6 +
 *                  self.nanosecond/3600.0/1e+9             # <<<<<<<<<<<<<<
 *                 )/24.0)
 * 
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__nanosecond); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_FromDouble(3600.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(1e+9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __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_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":441
 *                  self.microsecond/3600.0/1e+6 +
 *                  self.nanosecond/3600.0/1e+9
 *                 )/24.0)             # <<<<<<<<<<<<<<
 * 
 * _nat_strings = set(['NaT','nat','NAT','nan','NaN','NAN'])
 */
  __pyx_t_3 = PyFloat_FromDouble(24.0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __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_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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib.Timestamp.to_julian_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_month);
  __Pyx_XDECREF(__pyx_v_day);
  __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":447
 *     """(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":450
 *         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 = 450; __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 = 450; __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 = 450; __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 = 450; __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":451
 * 
 *         base = _NaT.__new__(cls, 1, 1, 1)
 *         mangle_nat(base)             # <<<<<<<<<<<<<<
 *         base.value = NPY_NAT
 * 
 */
  mangle_nat(((PyObject *)__pyx_v_base));

  /* "pandas/tslib.pyx":452
 *         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":454
 *         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":456
 *         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":457
 * 
 *     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":459
 *         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":460
 * 
 *     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":462
 *         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":463
 * 
 *     def __hash__(self):
 *         return iNaT             # <<<<<<<<<<<<<<
 * 
 *     def __int__(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 = 463; __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_9__int__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_9__int__ = {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_9__int__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_9__int__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_8__int__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":465
 *         return iNaT
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return NPY_NAT
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_8__int__(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("__int__", 0);

  /* "pandas/tslib.pyx":466
 * 
 *     def __int__(self):
 *         return NPY_NAT             # <<<<<<<<<<<<<<
 * 
 *     def __long__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __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.__int__", __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_11__long__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_11__long__ = {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_11__long__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_11__long__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6pandas_5tslib_7NaTType_10__long__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":468
 *         return NPY_NAT
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return NPY_NAT
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_10__long__(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("__long__", 0);

  /* "pandas/tslib.pyx":469
 * 
 *     def __long__(self):
 *         return NPY_NAT             # <<<<<<<<<<<<<<
 * 
 *     def weekday(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __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.__long__", __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_13weekday(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_13weekday = {__Pyx_NAMESTR("weekday"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_13weekday, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_13weekday(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_12weekday(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* "pandas/tslib.pyx":472
 * 
 *     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_15toordinal(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_15toordinal = {__Pyx_NAMESTR("toordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_15toordinal, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_15toordinal(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_14toordinal(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

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

  /* "pandas/tslib.pyx":475
 * 
 *     def toordinal(self):
 *         return -1             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(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_17__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7NaTType_17__reduce__ = {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6pandas_5tslib_7NaTType_17__reduce__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7NaTType_17__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_7NaTType_16__reduce__(__pyx_self, ((PyObject *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":477
 *         return -1
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return (__nat_unpickle, (None, ))
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_7NaTType_16__reduce__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED 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("__reduce__", 0);

  /* "pandas/tslib.pyx":478
 * 
 *     def __reduce__(self):
 *         return (__nat_unpickle, (None, ))             # <<<<<<<<<<<<<<
 * 
 * fields = ['year', 'quarter', 'month', 'day', 'hour',
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s____nat_unpickle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __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 = 478; __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_INCREF(((PyObject *)__pyx_k_tuple_36));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_k_tuple_36));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas.tslib.NaTType.__reduce__", __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_7__nat_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_7__nat_unpickle = {__Pyx_NAMESTR("__nat_unpickle"), (PyCFunction)__pyx_pw_6pandas_5tslib_7__nat_unpickle, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_7__nat_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nat_unpickle (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__nat_unpickle", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_6pandas_5tslib_6__nat_unpickle(__pyx_self, __pyx_v_args);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":487
 *     setattr(NaTType, field, prop)
 * 
 * def __nat_unpickle(*args):             # <<<<<<<<<<<<<<
 *     # return constant defined in the module
 *     return NaT
 */

static PyObject *__pyx_pf_6pandas_5tslib_6__nat_unpickle(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  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("__nat_unpickle", 0);

  /* "pandas/tslib.pyx":489
 * def __nat_unpickle(*args):
 *     # return constant defined in the module
 *     return NaT             # <<<<<<<<<<<<<<
 * 
 * NaT = NaTType()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __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.__nat_unpickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":496
 * 
 * 
 * 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":498
 * 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 = 498; __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 = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_1) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":499
 *     """ 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 = 499; __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 = 499; __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 = 499; __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 = 499; __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 = 499; __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 = 499; __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 = 498; __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":501
 *         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":502
 * 
 * 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":505
 * 
 * 
 * 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":506
 * 
 * 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":507
 * 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 = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_37), __pyx_v_zone); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __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 = 507; __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 = 507; __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":508
 *     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 = 508; __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":509
 *         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_38), __pyx_v_zone); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __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_9is_timestamp_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_9is_timestamp_array = {__Pyx_NAMESTR("is_timestamp_array"), (PyCFunction)__pyx_pw_6pandas_5tslib_9is_timestamp_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_9is_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 = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_8is_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":511
 *         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_8is_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 = 511; __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":512
 * 
 * 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 = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":513
 * 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":514
 *     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 = 514; __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":515
 *     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":516
 *         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 = 516; __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":517
 *     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 = 517; __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":518
 *         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 = 518; __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":521
 * 
 * 
 * cpdef object get_value_box(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pw_6pandas_5tslib_11get_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":525
 *         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":526
 *         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 = 526; __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 = 526; __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":527
 *     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 = 527; __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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":528
 *         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":529
 *         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 = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_5);

  /* "pandas/tslib.pyx":530
 *             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":532
 *     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":533
 * 
 *     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":535
 *         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":536
 * 
 *     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_40), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __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 = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/tslib.pyx":538
 *         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":539
 * 
 *     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 = 539; __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 = 539; __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 = 539; __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 = 539; __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":541
 *         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 = 541; __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_11get_value_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_11get_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 = 521; __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 = 521; __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 = 521; __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 = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_10get_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":521
 * 
 * 
 * cpdef object get_value_box(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pf_6pandas_5tslib_10get_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 = 521; __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_13unique_deltas(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_13unique_deltas = {__Pyx_NAMESTR("unique_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_13unique_deltas, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_13unique_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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_12unique_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":561
 * # Frequency inference
 * 
 * def unique_deltas(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */

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

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

  /* "pandas/tslib.pyx":568
 *         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 = 568; __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":570
 *         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":571
 * 
 *     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":572
 *     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":573
 *     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 = 573; __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 = 573; __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":574
 *     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":575
 *         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":576
 *         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":577
 *         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 = 577; __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 = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/tslib.pyx":578
 *             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":580
 *     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 = 580; __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 = 580; __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 = 580; __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 = 580; __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 = 580; __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 = 580; __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 = 580; __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 = 580; __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":581
 * 
 *     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 = 581; __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 = 581; __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":582
 *     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":585
 * 
 * 
 * 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":586
 * 
 * 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 = 586; __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_15apply_offset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_15apply_offset = {__Pyx_NAMESTR("apply_offset"), (PyCFunction)__pyx_pw_6pandas_5tslib_15apply_offset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_15apply_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 = 589; __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 = 589; __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 = 589; __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 = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_14apply_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":589
 * 
 * 
 * def apply_offset(ndarray[object] values, object offset):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

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

  /* "pandas/tslib.pyx":595
 *         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 = 595; __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 = 595; __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 = 595; __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 = 595; __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 = 595; __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_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":596
 * 
 *     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 = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __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 = 596; __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 = 596; __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":599
 * 
 * 
 * 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":600
 * 
 * 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":601
 * 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":602
 *     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":603
 *         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":604
 *     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":605
 *         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":606
 *     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":607
 *         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":608
 *     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":609
 *         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":610
 *     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":611
 *         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":635
 *         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":636
 * 
 *     def __hash__(_Timestamp self):
 *         if self.nanosecond:             # <<<<<<<<<<<<<<
 *             return hash(self.value)
 *         return datetime.__hash__(self)
 */
  if (__pyx_v_self->nanosecond) {

    /* "pandas/tslib.pyx":637
 *     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 = 637; __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 = 637; __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":638
 *         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 = 638; __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 = 638; __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 = 638; __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 = 638; __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 = 640; __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":640
 *         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":645
 *             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":646
 * 
 *         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":647
 *         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 = 647; __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 = 647; __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 = 647; __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":648
 *             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 = 648; __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":649
 *                 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":650
 *             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":651
 *         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 = 651; __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":652
 *             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 = 652; __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 = 652; __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":654
 *                 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":655
 * 
 *             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 = 655; __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 = 655; __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 = 655; __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 = 655; __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":656
 *             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 = 656; __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":657
 *                 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 = 657; __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 = 657; __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 = 657; __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":659
 *                 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 = 659; __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 = 659; __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":661
 *             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":662
 * 
 *             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":663
 *             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 = 663; __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 = 663; __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 = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":664
 *                 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 = 664; __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 = 664; __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 = 664; __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":667
 *                     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 = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);

          /* "pandas/tslib.pyx":668
 *                         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 = 668; __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 = 667; __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_42), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __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 = 666; __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 = 666; __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 = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_L18:;
        goto __pyx_L17;
      }
      __pyx_L17:;

      /* "pandas/tslib.pyx":669
 *                                         (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 = 669; __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":671
 *                 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":672
 *             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 = 672; __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":673
 *                 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":674
 *                     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 = 674; __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":676
 *                     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 = 676; __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 = 676; __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 = 676; __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_42), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __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 = 675; __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 = 675; __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 = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L16:;
  }
  __pyx_L3:;

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

  /* "pandas/tslib.pyx":679
 * 
 *         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 = 679; __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 = 679; __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":681
 *         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":683
 *     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 = 683; __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":685
 *         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 = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":687
 *         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":688
 * 
 *         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 = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":690
 *             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":691
 *         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":692
 *             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":693
 *                 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":694
 *             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":695
 *                 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 = 695; __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 = 695; __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":696
 *             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":697
 *                 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 = 697; __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 = 697; __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":698
 *             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":699
 *                 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 = 699; __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 = 699; __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":700
 *             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":701
 *                 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 = 701; __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 = 701; __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":703
 *                 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":705
 *     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 = 705; __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":706
 *                                         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 = 706; __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":707
 *         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_44), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __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 = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":709
 *                 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 = 709; __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":710
 *                                  '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_45), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __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 = 710; __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":712
 *             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 = 712; __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 = 712; __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 = 712; __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":716
 *             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 = 716; __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 = 716; __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 = 716; __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":717
 *             _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":718
 *         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 = 718; __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 = 718; __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 = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "pandas/tslib.pyx":719
 *         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 = 719; __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 = 719; __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 = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "pandas/tslib.pyx":720
 *         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 = 720; __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 = 718; __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 = 718; __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":712
 *             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 = 712; __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":722
 *                         dts.us, ts.tzinfo)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         cdef int64_t other_int
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_6__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  __pyx_t_5numpy_int64_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;
  __pyx_t_5numpy_int64_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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":725
 *         cdef int64_t other_int
 * 
 *         if is_timedelta64_object(other):             # <<<<<<<<<<<<<<
 *             other_int = other.astype('timedelta64[ns]').view('i8')
 *             return Timestamp(self.value + other_int, tz=self.tzinfo, offset=self.offset)
 */
  __pyx_t_1 = is_timedelta64_object(__pyx_v_other);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":726
 * 
 *         if is_timedelta64_object(other):
 *             other_int = other.astype('timedelta64[ns]').view('i8')             # <<<<<<<<<<<<<<
 *             return Timestamp(self.value + other_int, tz=self.tzinfo, offset=self.offset)
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __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__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __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_48), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_other_int = __pyx_t_4;

    /* "pandas/tslib.pyx":727
 *         if is_timedelta64_object(other):
 *             other_int = other.astype('timedelta64[ns]').view('i8')
 *             return Timestamp(self.value + other_int, tz=self.tzinfo, offset=self.offset)             # <<<<<<<<<<<<<<
 * 
 *         elif is_integer_object(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 = 727; __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 = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_other_int); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __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_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __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 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tzinfo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__tz), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__offset), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __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_5)); __pyx_t_5 = 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_L3;
  }

  /* "pandas/tslib.pyx":729
 *             return Timestamp(self.value + other_int, tz=self.tzinfo, offset=self.offset)
 * 
 *         elif 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":730
 * 
 *         elif is_integer_object(other):
 *             if self.offset is None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Cannot add integral value to Timestamp "
 *                                  "without offset.")
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __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":731
 *         elif 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), offset=self.offset)
 */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __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 = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

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

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

    /* "pandas/tslib.pyx":736
 * 
 *         elif isinstance(other, timedelta) or hasattr(other, 'delta'):
 *             nanos = _delta_to_nanoseconds(other)             # <<<<<<<<<<<<<<
 *             return Timestamp(self.value + nanos, tz=self.tzinfo, offset=self.offset)
 * 
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_51); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    __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 = 736; __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_v_nanos = __pyx_t_5;
    __pyx_t_5 = 0;

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

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

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

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

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

  /* "pandas/tslib.pyx":743
 *             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_5);
  __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":745
 *         return result
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         if is_timedelta64_object(other) or is_integer_object(other) \
 *                 or isinstance(other, timedelta) or hasattr(other, 'delta'):
 */

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
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "pandas/tslib.pyx":746
 * 
 *     def __sub__(self, other):
 *         if is_timedelta64_object(other) or is_integer_object(other) \             # <<<<<<<<<<<<<<
 *                 or isinstance(other, timedelta) or hasattr(other, 'delta'):
 *             neg_other = -other
 */
  if (!is_timedelta64_object(__pyx_v_other)) {

    /* "pandas/tslib.pyx":747
 *     def __sub__(self, other):
 *         if is_timedelta64_object(other) or is_integer_object(other) \
 *                 or isinstance(other, timedelta) or hasattr(other, 'delta'):             # <<<<<<<<<<<<<<
 *             neg_other = -other
 *             return self + neg_other
 */
    if (!is_integer_object(__pyx_v_other)) {
      __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_8datetime_timedelta));
      __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) {
        __pyx_t_1 = ((PyObject *)__pyx_n_s__delta);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = PyObject_HasAttr(__pyx_v_other, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __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_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = is_integer_object(__pyx_v_other);
    }
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = is_timedelta64_object(__pyx_v_other);
  }
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":748
 *         if is_timedelta64_object(other) or is_integer_object(other) \
 *                 or isinstance(other, timedelta) or hasattr(other, 'delta'):
 *             neg_other = -other             # <<<<<<<<<<<<<<
 *             return self + neg_other
 *         elif other is NaT:
 */
    __pyx_t_1 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_neg_other = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":749
 *                 or isinstance(other, timedelta) or hasattr(other, 'delta'):
 *             neg_other = -other
 *             return self + neg_other             # <<<<<<<<<<<<<<
 *         elif other is NaT:
 *             return NaT
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyNumber_Add(__pyx_v_self, __pyx_v_neg_other); 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;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":750
 *             neg_other = -other
 *             return self + neg_other
 *         elif other is NaT:             # <<<<<<<<<<<<<<
 *             return NaT
 *         return datetime.__sub__(self, other)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = (__pyx_v_other == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":751
 *             return self + neg_other
 *         elif other is NaT:
 *             return NaT             # <<<<<<<<<<<<<<
 *         return datetime.__sub__(self, other)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); 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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":752
 *         elif other is NaT:
 *             return NaT
 *         return datetime.__sub__(self, other)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get_field(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)), __pyx_n_s____sub__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_other);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other);
  __Pyx_GIVEREF(__pyx_v_other);
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":754
 *         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 = 754; __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 = 754; __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 = 754; __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":755
 * 
 *     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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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 = 755; __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":756
 *     cpdef _get_field(self, field):
 *         out = get_date_field(np.array([self.value], dtype=np.int64), field)
 *         return out[0]             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get_start_end_field(self, field):
 */
  __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 = 756; __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":754
 *         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 = 754; __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;
}

/* "pandas/tslib.pyx":758
 *         return out[0]
 * 
 *     cpdef _get_start_end_field(self, field):             # <<<<<<<<<<<<<<
 *         month_kw = self.freq.kwds.get('startingMonth', self.freq.kwds.get('month', 12)) if self.freq else 12
 *         freqstr = self.freqstr if self.freq else None
 */

static PyObject *__pyx_pw_6pandas_5tslib_10_Timestamp_13_get_start_end_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_6pandas_5tslib_10_Timestamp__get_start_end_field(struct __pyx_obj_6pandas_5tslib__Timestamp *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_month_kw = NULL;
  PyObject *__pyx_v_freqstr = NULL;
  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;
  int __pyx_t_4;
  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("_get_start_end_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_23); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __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_13_get_start_end_field)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __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 = 758; __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":759
 * 
 *     cpdef _get_start_end_field(self, field):
 *         month_kw = self.freq.kwds.get('startingMonth', self.freq.kwds.get('month', 12)) if self.freq else 12             # <<<<<<<<<<<<<<
 *         freqstr = self.freqstr if self.freq else None
 *         out = get_start_end_field(np.array([self.value], dtype=np.int64), field, freqstr, month_kw)
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__freq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__freq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__kwds); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __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_GetAttr(__pyx_t_2, __pyx_n_s__get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __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(((PyObject *)__pyx_v_self), __pyx_n_s__freq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__kwds); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __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_GetAttr(__pyx_t_5, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__startingMonth));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__startingMonth));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__startingMonth));
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(__pyx_int_12);
    __pyx_t_1 = __pyx_int_12;
  }
  __pyx_v_month_kw = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":760
 *     cpdef _get_start_end_field(self, field):
 *         month_kw = self.freq.kwds.get('startingMonth', self.freq.kwds.get('month', 12)) if self.freq else 12
 *         freqstr = self.freqstr if self.freq else None             # <<<<<<<<<<<<<<
 *         out = get_start_end_field(np.array([self.value], dtype=np.int64), field, freqstr, month_kw)
 *         return out[0]
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__freq); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_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[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_4) {
    __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__freqstr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_freqstr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":761
 *         month_kw = self.freq.kwds.get('startingMonth', self.freq.kwds.get('month', 12)) if self.freq else 12
 *         freqstr = self.freqstr if self.freq else None
 *         out = get_start_end_field(np.array([self.value], dtype=np.int64), field, freqstr, month_kw)             # <<<<<<<<<<<<<<
 *         return out[0]
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_start_end_field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__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 = 761; __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __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 = 761; __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 = 761; __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 = 761; __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 = 761; __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;
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_field);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_field);
  __Pyx_GIVEREF(__pyx_v_field);
  __Pyx_INCREF(__pyx_v_freqstr);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_freqstr);
  __Pyx_GIVEREF(__pyx_v_freqstr);
  __Pyx_INCREF(__pyx_v_month_kw);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_month_kw);
  __Pyx_GIVEREF(__pyx_v_month_kw);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_out = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pandas/tslib.pyx":762
 *         freqstr = self.freqstr if self.freq else None
 *         out = get_start_end_field(np.array([self.value], dtype=np.int64), field, freqstr, month_kw)
 *         return out[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_out, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

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

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

/* "pandas/tslib.pyx":758
 *         return out[0]
 * 
 *     cpdef _get_start_end_field(self, field):             # <<<<<<<<<<<<<<
 *         month_kw = self.freq.kwds.get('startingMonth', self.freq.kwds.get('month', 12)) if self.freq else 12
 *         freqstr = self.freqstr if self.freq else None
 */

static PyObject *__pyx_pf_6pandas_5tslib_10_Timestamp_12_get_start_end_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_start_end_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_5tslib__Timestamp *)__pyx_v_self->__pyx_vtab)->_get_start_end_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __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_start_end_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":632
 * 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 = 632; __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 = 632; __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":633
 *     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":768
 * 
 * 
 * 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":769
 * 
 * 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":784
 * 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":786
 *     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 = 786; __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 = 786; __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 = 788; __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":788
 *         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":789
 * 
 *     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 = 789; __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 = 789; __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":791
 *         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":792
 * 
 *         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 = 792; __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":794
 *             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":795
 * 
 *         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 = 795; __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 = 795; __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 = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":796
 *         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 = 796; __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 = 796; __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 = 796; __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":799
 *             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 = 799; __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 = 799; __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 = 799; __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_42), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __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 = 798; __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 = 798; __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 = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":800
 *                 raise TypeError('Cannot compare type %r with type %r' %
 *                                 (type(self).__name__, type(other).__name__))
 *         return PyObject_RichCompare(other, self, _reverse_ops[op])             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other):
 */
  __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 = 800; __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_4_NaT_5__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_5__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_4_NaT_4__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":802
 *         return PyObject_RichCompare(other, self, _reverse_ops[op])
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<<
 *         try:
 *             result = _Timestamp.__add__(self, other)
 */

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

  /* "pandas/tslib.pyx":803
 * 
 *     def __add__(self, other):
 *         try:             # <<<<<<<<<<<<<<
 *             result = _Timestamp.__add__(self, other)
 *             if result is NotImplemented:
 */
  {
    __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":804
 *     def __add__(self, other):
 *         try:
 *             result = _Timestamp.__add__(self, other)             # <<<<<<<<<<<<<<
 *             if result is NotImplemented:
 *                 return result
 */
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)), __pyx_n_s____add__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      __Pyx_INCREF(__pyx_v_other);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other);
      __Pyx_GIVEREF(__pyx_v_other);
      __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 = 804; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_v_result = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "pandas/tslib.pyx":805
 *         try:
 *             result = _Timestamp.__add__(self, other)
 *             if result is NotImplemented:             # <<<<<<<<<<<<<<
 *                 return result
 *         except (OverflowError, OutOfBoundsDatetime):
 */
      __pyx_t_7 = (__pyx_v_result == __pyx_builtin_NotImplemented);
      if (__pyx_t_7) {

        /* "pandas/tslib.pyx":806
 *             result = _Timestamp.__add__(self, other)
 *             if result is NotImplemented:
 *                 return result             # <<<<<<<<<<<<<<
 *         except (OverflowError, OutOfBoundsDatetime):
 *             pass
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_result);
        __pyx_r = __pyx_v_result;
        goto __pyx_L7_try_return;
        goto __pyx_L11;
      }
      __pyx_L11:;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pandas/tslib.pyx":807
 *             if result is NotImplemented:
 *                 return result
 *         except (OverflowError, OutOfBoundsDatetime):             # <<<<<<<<<<<<<<
 *             pass
 *         return NaT
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__OutOfBoundsDatetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError) || PyErr_ExceptionMatches(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_8) {
      PyErr_Restore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "pandas/tslib.pyx":809
 *         except (OverflowError, OutOfBoundsDatetime):
 *             pass
 *         return NaT             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas.tslib._NaT.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_7__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_4_NaT_7__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_4_NaT_6__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":811
 *         return NaT
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<<
 *         if type(self) is datetime:
 *             other, self = self, other
 */

static PyObject *__pyx_pf_6pandas_5tslib_4_NaT_6__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_other);

  /* "pandas/tslib.pyx":812
 * 
 *     def __sub__(self, other):
 *         if type(self) is datetime:             # <<<<<<<<<<<<<<
 *             other, self = self, other
 *         try:
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)((PyObject*)__pyx_ptype_8datetime_datetime)));
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":813
 *     def __sub__(self, other):
 *         if type(self) is datetime:
 *             other, self = self, other             # <<<<<<<<<<<<<<
 *         try:
 *             result = _Timestamp.__sub__(self, other)
 */
    __pyx_t_2 = __pyx_v_self;
    __pyx_t_3 = __pyx_v_other;
    __pyx_v_other = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_self = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":814
 *         if type(self) is datetime:
 *             other, self = self, other
 *         try:             # <<<<<<<<<<<<<<
 *             result = _Timestamp.__sub__(self, other)
 *             if result is NotImplemented:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "pandas/tslib.pyx":815
 *             other, self = self, other
 *         try:
 *             result = _Timestamp.__sub__(self, other)             # <<<<<<<<<<<<<<
 *             if result is NotImplemented:
 *                 return result
 */
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__Timestamp)), __pyx_n_s____sub__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      __Pyx_INCREF(__pyx_v_other);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_other);
      __Pyx_GIVEREF(__pyx_v_other);
      __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 = 815; __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_v_result = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":816
 *         try:
 *             result = _Timestamp.__sub__(self, other)
 *             if result is NotImplemented:             # <<<<<<<<<<<<<<
 *                 return result
 *         except (OverflowError, OutOfBoundsDatetime):
 */
      __pyx_t_1 = (__pyx_v_result == __pyx_builtin_NotImplemented);
      if (__pyx_t_1) {

        /* "pandas/tslib.pyx":817
 *             result = _Timestamp.__sub__(self, other)
 *             if result is NotImplemented:
 *                 return result             # <<<<<<<<<<<<<<
 *         except (OverflowError, OutOfBoundsDatetime):
 *             pass
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_result);
        __pyx_r = __pyx_v_result;
        goto __pyx_L8_try_return;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L11_try_end;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_4);
    goto __pyx_L0;
    __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":818
 *             if result is NotImplemented:
 *                 return result
 *         except (OverflowError, OutOfBoundsDatetime):             # <<<<<<<<<<<<<<
 *             pass
 *         return NaT
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__OutOfBoundsDatetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError) || PyErr_ExceptionMatches(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {
      PyErr_Restore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_4);
    __pyx_L11_try_end:;
  }

  /* "pandas/tslib.pyx":820
 *         except (OverflowError, OutOfBoundsDatetime):
 *             pass
 *         return NaT             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas.tslib._NaT.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_self);
  __Pyx_XDECREF(__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_17_delta_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_delta); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_17_delta_to_nanoseconds = {__Pyx_NAMESTR("_delta_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_17_delta_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_17_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_16_delta_to_nanoseconds(__pyx_self, ((PyObject *)__pyx_v_delta));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6pandas_5tslib_16_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":824
 * 
 * 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 = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":825
 * 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 = 825; __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":826
 *     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":827
 *         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 = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __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 = 827; __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 = 827; __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":828
 *     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":829
 *         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":830
 *     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":831
 *         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 = 830; __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 = 830; __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 = 830; __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 = 830; __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 = 830; __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 = 831; __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 = 831; __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 = 831; __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":832
 *     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 = 832; __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 = 832; __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 = 832; __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":843
 * 
 *     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":844
 *     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 = 844; __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":846
 *             return self.value
 * 
 * cpdef _get_utcoffset(tzinfo, obj):             # <<<<<<<<<<<<<<
 *     try:
 *         return tzinfo._utcoffset
 */

static PyObject *__pyx_pw_6pandas_5tslib_19_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":847
 * 
 * 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":848
 * 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 = 848; __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":849
 *     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 = 849; __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":850
 *         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 = 850; __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 = 850; __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 = 850; __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_19_get_utcoffset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_19_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 = 846; __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 = 846; __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 = 846; __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_18_get_utcoffset(__pyx_self, __pyx_v_tzinfo, __pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_6pandas_5tslib_18_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 = 846; __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":853
 * 
 * # 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":866
 *     cdef:
 *         _TSObject obj
 *         bint utc_convert = 1             # <<<<<<<<<<<<<<
 * 
 *     if tz is not None:
 */
  __pyx_v_utc_convert = 1;

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

      /* "pandas/tslib.pyx":870
 *     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 = 870; __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 = 870; __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 = 870; __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 = 870; __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":872
 *             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 = 872; __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":874
 *     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 = 874; __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 = 874; __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":875
 * 
 *     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":876
 *     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":877
 *         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 = 877; __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 = 877; __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":878
 *     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":879
 *         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":880
 *         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 = 880; __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 = 880; __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 = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "pandas/tslib.pyx":881
 *     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":883
 *             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 = 883; __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 = 883; __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 = 883; __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":884
 *         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 = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_obj->value = __pyx_t_9;

      /* "pandas/tslib.pyx":885
 *             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 = 885; __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":886
 *             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":887
 *             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 = 887; __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 = 887; __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 = 887; __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 = 887; __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 = 887; __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":888
 *     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":890
 *             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 = 890; __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 = 890; __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":891
 *         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 = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_obj->value = __pyx_t_9;

      /* "pandas/tslib.pyx":892
 *             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 = 892; __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":893
 *             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":894
 *             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 = 894; __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 = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_7) {

      /* "pandas/tslib.pyx":895
 *     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":897
 *             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 = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/tslib.pyx":898
 *         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":899
 *             _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":900
 *             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":902
 *         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 = 902; __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":903
 *             # 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 = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_7) {

          /* "pandas/tslib.pyx":904
 *             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 = 904; __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 = 904; __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":905
 *                 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 = 905; __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 = 905; __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 = 905; __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":906
 *                     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":907
 *                     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 = 907; __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":909
 *                     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":910
 *                 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 = 910; __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 = 910; __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":911
 *                     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 = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_51); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __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 = 911; __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 = 911; __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 = 911; __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 = 911; __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":912
 *                     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 = 912; __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":913
 *                     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 = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s_51); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __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 = 913; __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 = 913; __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 = 913; __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 = 913; __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":915
 *                     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":916
 *                     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":917
 *                                                       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":918
 *                     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":919
 *             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 = 919; __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 = 919; __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 = 919; __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":920
 *                 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 = 920; __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":921
 *                     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 = 921; __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 = 921; __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 = 921; __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 = 921; __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":922
 *                 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":923
 *                     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 = 923; __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":926
 *             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":927
 *                 # 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 = 927; __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 = 927; __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":929
 *                 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":930
 *         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 = 930; __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":932
 *             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":933
 * 
 *         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 = 933; __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":934
 *         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 = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_51); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __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 = 934; __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 = 934; __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 = 934; __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 = 934; __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":936
 *             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":937
 * 
 *         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 = 937; __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 = 937; __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 = 937; __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 = 937; __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":938
 *         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 = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":939
 *             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":940
 *         _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":942
 *     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 = 942; __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 = 942; __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 = 942; __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 = 942; __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 = 942; __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":943
 *         # 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 = 943; __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":946
 *     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_54), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __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 = 945; __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 = 945; __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 = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L5:;

  /* "pandas/tslib.pyx":948
 *                          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":949
 * 
 *     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 = 949; __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":951
 *         _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":952
 * 
 *     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":954
 *         _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":956
 *     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":957
 * 
 * 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":958
 * 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":959
 *     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 = 959; __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 = 959; __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 = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_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 = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":960
 *         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":961
 *     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 = 961; __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 = 961; __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 = 961; __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 = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);

    /* "pandas/tslib.pyx":962
 *         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 = 962; __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 = 962; __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 = 962; __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 = 961; __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 = 961; __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":963
 *         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 = 963; __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 = 963; __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 = 963; __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 = 963; __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 = 963; __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":964
 *                       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 = 964; __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 = 964; __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 = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "pandas/tslib.pyx":965
 *         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":966
 *         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":969
 *     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 = 969; __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 = 969; __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 = 969; __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":970
 *         # 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 = 970; __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 = 970; __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 = 970; __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":971
 *         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 = 971; __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 = 971; __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 = 971; __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 = 971; __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 = 971; __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 = 971; __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 = 971; __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":974
 * 
 *         # 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 = 974; __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":975
 *         # 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 = 975; __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 = 975; __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 = 975; __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 = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pandas/tslib.pyx":976
 *         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":977
 *             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":979
 *             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 = 979; __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 = 979; __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":980
 *         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 = 980; __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 = 980; __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 = 980; __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 = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pandas/tslib.pyx":981
 *             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":982
 *             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 = 982; __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 = 982; __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_21get_timezone(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_21get_timezone = {__Pyx_NAMESTR("get_timezone"), (PyCFunction)__pyx_pw_6pandas_5tslib_21get_timezone, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_21get_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_20get_timezone(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":985
 * 
 * 
 * def get_timezone(tz):             # <<<<<<<<<<<<<<
 *     return _get_zone(tz)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_20get_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":986
 * 
 * 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 = 986; __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":988
 *     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":989
 * 
 * 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 = 989; __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 = 989; __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 = 989; __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":991
 *     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":992
 * 
 * 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":993
 * 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":995
 *         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":996
 *     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 = 996; __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":997
 *         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":998
 *             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":999
 *             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":1000
 *                 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 = 1000; __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":1001
 *             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":1007
 *     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":1009
 * 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":1011
 *         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":1012
 * 
 *     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":1014
 *         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":1015
 *     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":1016
 *             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":1018
 *         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":1019
 * 
 *     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 = 1019; __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 = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);

    /* "pandas/tslib.pyx":1020
 *     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 = 1020; __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 = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);

    /* "pandas/tslib.pyx":1021
 *         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 = 1021; __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 = 1021; __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 = 1019; __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_55), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __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":1023
 *                                                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 = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_56), __pyx_v_fmt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __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 = 1023; __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 = 1023; __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 = 1023; __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_23datetime_to_datetime64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_23datetime_to_datetime64 = {__Pyx_NAMESTR("datetime_to_datetime64"), (PyCFunction)__pyx_pw_6pandas_5tslib_23datetime_to_datetime64, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_23datetime_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 = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_22datetime_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":1034
 * #     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_22datetime_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 = 1034; __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":1036
 * 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 = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1037
 *     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":1042
 *         _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 = 1042; __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 = 1042; __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 = 1042; __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 = 1042; __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 = 1042; __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_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __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 = 1042; __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":1043
 * 
 *     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 = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __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 = 1043; __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 = 1043; __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":1044
 *     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":1045
 *     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 = 1045; __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":1046
 *     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":1047
 *         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 = 1047; __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 = 1047; __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 = 1047; __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":1048
 *         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":1049
 *             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 = 1049; __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":1050
 *         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":1051
 *             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 = 1051; __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 = 1051; __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 = 1051; __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 = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_13) {

            /* "pandas/tslib.pyx":1052
 *                 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_59), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __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 = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            goto __pyx_L8;
          }
          __pyx_L8:;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1054
 *                         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 = 1054; __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 = 1054; __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":1056
 *                     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 = 1056; __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 = 1056; __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":1057
 * 
 *                 _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 = 1057; __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":1058
 *                 _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 = 1058; __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":1060
 *                 _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":1061
 *             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_61), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __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 = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "pandas/tslib.pyx":1062
 *                 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 = 1062; __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":1063
 *                     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 = 1063; __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":1065
 *                 _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_62), ((PyObject *)Py_TYPE(__pyx_v_val))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __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 = 1065; __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 = 1065; __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 = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "pandas/tslib.pyx":1067
 *             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 = 1067; __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_25_does_string_look_like_datetime(PyObject *__pyx_self, PyObject *__pyx_v_date_string); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_25_does_string_look_like_datetime = {__Pyx_NAMESTR("_does_string_look_like_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_25_does_string_look_like_datetime, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_25_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_24_does_string_look_like_datetime(__pyx_self, ((PyObject *)__pyx_v_date_string));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1071
 * _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_24_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":1072
 * 
 * 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 = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __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 = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1075
 *         # 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 = 1075; __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":1077
 *         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":1078
 * 
 *     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 = 1078; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __pyx_t_3 = (__pyx_t_7 < 1000.0);
      if (__pyx_t_3) {

        /* "pandas/tslib.pyx":1079
 *     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 = 1079; __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":1080
 *         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":1083
 *         pass
 * 
 *     if date_string in _not_datelike_strings:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __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 = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1084
 * 
 *     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 = 1084; __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":1086
 *         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 = 1086; __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_27parse_datetime_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_27parse_datetime_string = {__Pyx_NAMESTR("parse_datetime_string"), (PyCFunction)__pyx_pw_6pandas_5tslib_27parse_datetime_string, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_27parse_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 = 1088; __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 = 1088; __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_26parse_datetime_string(__pyx_self, __pyx_v_date_string, __pyx_v_kwargs);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1088
 *     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_26parse_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":1089
 * 
 * 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_65); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __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 = 1089; __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 = 1089; __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 = 1089; __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":1090
 * 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_67), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __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 = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1092
 *         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 = 1092; __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 = 1092; __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 = 1092; __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":1093
 * 
 *     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_29array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_29array_to_datetime = {__Pyx_NAMESTR("array_to_datetime"), (PyCFunction)__pyx_pw_6pandas_5tslib_29array_to_datetime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_29array_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_68;
    values[2] = __pyx_k_69;

    /* "pandas/tslib.pyx":1096
 * 
 * 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_70;
    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 = 1095; __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 = 1095; __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 = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_28array_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":1095
 *     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_28array_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;
  PyObject *__pyx_v_py_dt = 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;
  int __pyx_t_26;
  int __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;
  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;
  Py_ssize_t __pyx_t_58;
  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 = 1095; __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":1098
 *                       format=None, utc=None, coerce=False, unit=None):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         object val, py_dt
 *         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 = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1103
 *         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 = 1103; __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":1105
 *         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 = 1105; __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":1107
 *         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":1108
 * 
 *     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 = 1108; __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 = 1108; __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 = 1108; __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 = 1108; __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 = 1108; __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_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __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 = 1108; __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":1109
 *     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 = 1109; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __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 = 1109; __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 = 1109; __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":1110
 *         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":1111
 *         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 = 1111; __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":1112
 *         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":1113
 *             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 = 1113; __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 = 1113; __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 = 1113; __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":1114
 *             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":1115
 *                 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":1116
 *             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 = 1116; __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":1117
 *                 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":1118
 *                 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 = 1118; __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 = 1118; __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":1119
 *                     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 = 1119; __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":1120
 *                         _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":1121
 *                         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 = 1121; __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":1122
 *                         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 = 1122; __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":1123
 *                             _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 = 1123; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
                  if (__pyx_t_2) {

                    /* "pandas/tslib.pyx":1124
 *                         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 = 1124; __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 = 1124; __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 = 1124; __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":1125
 *                             if coerce:
 *                                 iresult[i] = iNaT
 *                                 continue             # <<<<<<<<<<<<<<
 *                             raise
 *                     else:
 */
                    goto __pyx_L25_except_continue;
                    goto __pyx_L26;
                  }
                  __pyx_L26:;

                  /* "pandas/tslib.pyx":1126
 *                                 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 = 1126; __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":1128
 *                             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_73), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __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 = 1128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            __pyx_L15:;
            goto __pyx_L14;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1132
 *                                          '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 = 1132; __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":1133
 *                 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":1134
 *                     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 = 1134; __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":1135
 *                     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":1136
 *                         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 = 1136; __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":1137
 *                     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 = 1137; __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":1138
 *                         _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 = 1138; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
                if (__pyx_t_2) {

                  /* "pandas/tslib.pyx":1139
 *                     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 = 1139; __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 = 1139; __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 = 1139; __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":1140
 *                         if coerce:
 *                             iresult[i] = iNaT
 *                             continue             # <<<<<<<<<<<<<<
 *                         raise
 *             elif PyDate_Check(val):
 */
                  goto __pyx_L37_except_continue;
                  goto __pyx_L38;
                }
                __pyx_L38:;

                /* "pandas/tslib.pyx":1141
 *                             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 = 1141; __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":1142
 *                             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":1143
 *                         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 = 1143; __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":1144
 *             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":1145
 *                 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 = 1145; __pyx_clineno = __LINE__; goto __pyx_L39_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "pandas/tslib.pyx":1146
 *                 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":1147
 *                     _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 = 1147; __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":1148
 *                     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 = 1148; __pyx_clineno = __LINE__; goto __pyx_L41_except_error;}
              if (__pyx_t_2) {

                /* "pandas/tslib.pyx":1149
 *                 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 = 1149; __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 = 1149; __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 = 1149; __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":1150
 *                     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":1151
 *                         iresult[i] = iNaT
 *                         continue
 *                     raise             # <<<<<<<<<<<<<<
 *             elif util.is_datetime64_object(val):
 *                 if val is np_NaT or val.view('i8') == iNaT:
 */
              __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 = 1151; __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":1152
 *                         continue
 *                     raise
 *             elif util.is_datetime64_object(val):             # <<<<<<<<<<<<<<
 *                 if val is np_NaT or val.view('i8') == iNaT:
 *                     iresult[i] = iNaT
 */
        __pyx_t_12 = is_datetime64_object(__pyx_v_val);
        if (__pyx_t_12) {

          /* "pandas/tslib.pyx":1153
 *                     raise
 *             elif util.is_datetime64_object(val):
 *                 if val is np_NaT or val.view('i8') == iNaT:             # <<<<<<<<<<<<<<
 *                     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 = 1153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = (__pyx_v_val == __pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!__pyx_t_2) {
            __pyx_t_9 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__view); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_27 = __pyx_t_26;
          } else {
            __pyx_t_27 = __pyx_t_2;
          }
          if (__pyx_t_27) {

            /* "pandas/tslib.pyx":1154
 *             elif util.is_datetime64_object(val):
 *                 if val is np_NaT or val.view('i8') == iNaT:
 *                     iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                 else:
 *                     try:
 */
            __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __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 = 1154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 1154; __pyx_clineno = __LINE__; goto __pyx_L3_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;
            goto __pyx_L50;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1156
 *                     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":1157
 *                 else:
 *                     try:
 *                         iresult[i] = _get_datetime64_nanos(val)             # <<<<<<<<<<<<<<
 *                         seen_datetime=1
 *                     except ValueError:
 */
                __pyx_t_10 = __pyx_f_6pandas_5tslib__get_datetime64_nanos(__pyx_v_val); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L51_error;}
                __Pyx_GOTREF(__pyx_t_10);
                __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 = 1157; __pyx_clineno = __LINE__; goto __pyx_L51_error;}
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_29 = __pyx_v_i;
                __pyx_t_12 = -1;
                if (__pyx_t_29 < 0) {
                  __pyx_t_29 += __pyx_pybuffernd_iresult.diminfo[0].shape;
                  if (unlikely(__pyx_t_29 < 0)) __pyx_t_12 = 0;
                } else if (unlikely(__pyx_t_29 >= __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 = 1157; __pyx_clineno = __LINE__; goto __pyx_L51_error;}
                }
                *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                /* "pandas/tslib.pyx":1158
 *                     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_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

              /* "pandas/tslib.pyx":1159
 *                         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_10, &__pyx_t_9, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_GOTREF(__pyx_t_3);

                /* "pandas/tslib.pyx":1160
 *                         seen_datetime=1
 *                     except ValueError:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                             iresult[i] = iNaT
 *                             continue
 */
                __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                if (__pyx_t_27) {

                  /* "pandas/tslib.pyx":1161
 *                     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 = 1161; __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 = 1161; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 1161; __pyx_clineno = __LINE__; goto __pyx_L53_except_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;

                  /* "pandas/tslib.pyx":1162
 *                         if coerce:
 *                             iresult[i] = iNaT
 *                             continue             # <<<<<<<<<<<<<<
 *                         raise
 * 
 */
                  goto __pyx_L60_except_continue;
                  goto __pyx_L61;
                }
                __pyx_L61:;

                /* "pandas/tslib.pyx":1163
 *                             iresult[i] = iNaT
 *                             continue
 *                         raise             # <<<<<<<<<<<<<<
 * 
 *             # if we are coercing, dont' allow integers
 */
                __Pyx_GIVEREF(__pyx_t_10);
                __Pyx_GIVEREF(__pyx_t_9);
                __Pyx_GIVEREF(__pyx_t_3);
                __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_3);
                __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_3 = 0; 
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L53_except_error;}
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L52_exception_handled;
                __pyx_L60_except_continue:;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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":1166
 * 
 *             # 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_27 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_2 = (!__pyx_t_27);
          __pyx_t_27 = __pyx_t_2;
        } else {
          __pyx_t_27 = is_integer_object(__pyx_v_val);
        }
        if (__pyx_t_27) {

          /* "pandas/tslib.pyx":1167
 *             # 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_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_27) {

            /* "pandas/tslib.pyx":1168
 *             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 = 1168; __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 = 1168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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 = 1168; __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;
            goto __pyx_L62;
          }
          /*else*/ {

            /* "pandas/tslib.pyx":1170
 *                     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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_32 = __pyx_v_i;
            __pyx_t_12 = -1;
            if (__pyx_t_32 < 0) {
              __pyx_t_32 += __pyx_pybuffernd_iresult.diminfo[0].shape;
              if (unlikely(__pyx_t_32 < 0)) __pyx_t_12 = 0;
            } else if (unlikely(__pyx_t_32 >= __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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

            /* "pandas/tslib.pyx":1171
 *                 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":1172
 *                     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_27 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_2 = (!__pyx_t_27);
          __pyx_t_27 = __pyx_t_2;
        } else {
          __pyx_t_27 = is_float_object(__pyx_v_val);
        }
        if (__pyx_t_27) {

          /* "pandas/tslib.pyx":1173
 *                     seen_integer=1
 *             elif util.is_float_object(val) and not coerce:
 *                 if val != val or val == iNaT:             # <<<<<<<<<<<<<<
 *                     iresult[i] = iNaT
 *                 else:
 */
          __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[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!__pyx_t_27) {
            __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_9 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_26 = __pyx_t_2;
          } else {
            __pyx_t_26 = __pyx_t_27;
          }
          if (__pyx_t_26) {

            /* "pandas/tslib.pyx":1174
 *             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 = 1174; __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 = 1174; __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 = 1174; __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":1176
 *                     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 = 1176; __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 = 1176; __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":1177
 *                 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":1179
 *                     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":1180
 *             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 = 1180; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __pyx_t_26 = (__pyx_t_35 == 0);
              if (__pyx_t_26) {

                /* "pandas/tslib.pyx":1181
 *                 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 = 1181; __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 = 1181; __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 = 1181; __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":1182
 *                     if len(val) == 0:
 *                        iresult[i] = iNaT
 *                        continue             # <<<<<<<<<<<<<<
 * 
 *                     elif val in _nat_strings:
 */
                goto __pyx_L70_try_continue;
                goto __pyx_L72;
              }

              /* "pandas/tslib.pyx":1184
 *                        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 = 1184; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_26 = (__Pyx_PySequence_Contains(__pyx_v_val, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_26) {

                /* "pandas/tslib.pyx":1185
 * 
 *                     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 = 1185; __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 = 1185; __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 = 1185; __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":1186
 *                     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":1188
 *                        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 = 1188; __pyx_clineno = __LINE__; goto __pyx_L64_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

              /* "pandas/tslib.pyx":1189
 * 
 *                     _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 = 1189; __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":1191
 *                     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 = 1191; __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_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":1192
 *                                                                    &dts)
 *                     _check_dts_bounds(&dts)
 *                 except ValueError:             # <<<<<<<<<<<<<<
 *                     try:
 *                         py_dt = parse_datetime_string(val, dayfirst=dayfirst)
 */
            __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 = 1192; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_10);

              /* "pandas/tslib.pyx":1193
 *                     _check_dts_bounds(&dts)
 *                 except ValueError:
 *                     try:             # <<<<<<<<<<<<<<
 *                         py_dt = parse_datetime_string(val, dayfirst=dayfirst)
 *                     except Exception:
 */
              {
                __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":1194
 *                 except ValueError:
 *                     try:
 *                         py_dt = parse_datetime_string(val, dayfirst=dayfirst)             # <<<<<<<<<<<<<<
 *                     except Exception:
 *                         if coerce:
 */
                  __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s_75); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __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 = 1194; __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 = 1194; __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 = 1194; __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 = 1194; __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;
                  __Pyx_XDECREF(__pyx_v_py_dt);
                  __pyx_v_py_dt = __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":1195
 *                     try:
 *                         py_dt = parse_datetime_string(val, dayfirst=dayfirst)
 *                     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 = 1195; __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":1196
 *                         py_dt = parse_datetime_string(val, dayfirst=dayfirst)
 *                     except Exception:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                            iresult[i] = iNaT
 *                            continue
 */
                  __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                  if (__pyx_t_26) {

                    /* "pandas/tslib.pyx":1197
 *                     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 = 1197; __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 = 1197; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                    __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 = 1197; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;}
                    }
                    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_iresult.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_iresult.diminfo[0].strides) = __pyx_t_4;

                    /* "pandas/tslib.pyx":1198
 *                         if coerce:
 *                            iresult[i] = iNaT
 *                            continue             # <<<<<<<<<<<<<<
 *                         raise TypeError
 * 
 */
                    goto __pyx_L84_except_continue;
                    goto __pyx_L85;
                  }
                  __pyx_L85:;

                  /* "pandas/tslib.pyx":1199
 *                            iresult[i] = iNaT
 *                            continue
 *                         raise TypeError             # <<<<<<<<<<<<<<
 * 
 *                     try:
 */
                  __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0);
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __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":1201
 *                         raise TypeError
 * 
 *                     try:             # <<<<<<<<<<<<<<
 *                         _ts = convert_to_tsobject(py_dt, None, None)
 *                         iresult[i] = _ts.value
 */
              {
                __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":1202
 * 
 *                     try:
 *                         _ts = convert_to_tsobject(py_dt, None, None)             # <<<<<<<<<<<<<<
 *                         iresult[i] = _ts.value
 *                     except ValueError:
 */
                  __pyx_t_41 = Py_None;
                  __Pyx_INCREF(__pyx_t_41);
                  __pyx_t_42 = Py_None;
                  __Pyx_INCREF(__pyx_t_42);
                  __pyx_t_43 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_v_py_dt, __pyx_t_41, __pyx_t_42); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
                  __Pyx_GOTREF(__pyx_t_43);
                  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
                  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
                  if (!(likely(((__pyx_t_43) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_43, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
                  __Pyx_XDECREF(((PyObject *)__pyx_v__ts));
                  __pyx_v__ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_43);
                  __pyx_t_43 = 0;

                  /* "pandas/tslib.pyx":1203
 *                     try:
 *                         _ts = convert_to_tsobject(py_dt, None, None)
 *                         iresult[i] = _ts.value             # <<<<<<<<<<<<<<
 *                     except ValueError:
 *                         if coerce:
 */
                  __pyx_t_4 = __pyx_v__ts->value;
                  __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 = 1203; __pyx_clineno = __LINE__; goto __pyx_L86_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;
                }
                __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_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":1204
 *                         _ts = convert_to_tsobject(py_dt, None, None)
 *                         iresult[i] = _ts.value
 *                     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_43, &__pyx_t_42, &__pyx_t_41) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                  __Pyx_GOTREF(__pyx_t_43);
                  __Pyx_GOTREF(__pyx_t_42);
                  __Pyx_GOTREF(__pyx_t_41);

                  /* "pandas/tslib.pyx":1205
 *                         iresult[i] = _ts.value
 *                     except ValueError:
 *                         if coerce:             # <<<<<<<<<<<<<<
 *                             iresult[i] = iNaT
 *                             continue
 */
                  __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L88_except_error;}
                  if (__pyx_t_26) {

                    /* "pandas/tslib.pyx":1206
 *                     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 = 1206; __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 = 1206; __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 = 1206; __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":1207
 *                         if coerce:
 *                             iresult[i] = iNaT
 *                             continue             # <<<<<<<<<<<<<<
 *                         raise
 *                 except:
 */
                    goto __pyx_L95_except_continue;
                    goto __pyx_L96;
                  }
                  __pyx_L96:;

                  /* "pandas/tslib.pyx":1208
 *                             iresult[i] = iNaT
 *                             continue
 *                         raise             # <<<<<<<<<<<<<<
 *                 except:
 *                     if coerce:
 */
                  __Pyx_GIVEREF(__pyx_t_43);
                  __Pyx_GIVEREF(__pyx_t_42);
                  __Pyx_GIVEREF(__pyx_t_41);
                  __Pyx_ErrRestore(__pyx_t_43, __pyx_t_42, __pyx_t_41);
                  __pyx_t_43 = 0; __pyx_t_42 = 0; __pyx_t_41 = 0; 
                  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L88_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_L87_exception_handled;
                  __pyx_L95_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_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_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              goto __pyx_L65_exception_handled;
              __pyx_L74_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_L70_try_continue;
            }

            /* "pandas/tslib.pyx":1209
 *                             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_10, &__pyx_t_3, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_9);

              /* "pandas/tslib.pyx":1210
 *                         raise
 *                 except:
 *                     if coerce:             # <<<<<<<<<<<<<<
 *                         iresult[i] = iNaT
 *                         continue
 */
              __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_v_coerce); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
              if (__pyx_t_26) {

                /* "pandas/tslib.pyx":1211
 *                 except:
 *                     if coerce:
 *                         iresult[i] = iNaT             # <<<<<<<<<<<<<<
 *                         continue
 *                     raise
 */
                __pyx_t_41 = __Pyx_GetName(__pyx_m, __pyx_n_s__iNaT); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
                __Pyx_GOTREF(__pyx_t_41);
                __pyx_t_4 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_41); if (unlikely((__pyx_t_4 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L66_except_error;}
                __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 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 = 1211; __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":1212
 *                     if coerce:
 *                         iresult[i] = iNaT
 *                         continue             # <<<<<<<<<<<<<<
 *                     raise
 * 
 */
                goto __pyx_L98_except_continue;
                goto __pyx_L99;
              }
              __pyx_L99:;

              /* "pandas/tslib.pyx":1213
 *                         iresult[i] = iNaT
 *                         continue
 *                     raise             # <<<<<<<<<<<<<<
 * 
 *         # don't allow mixed integers and datetime like
 */
              __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 = 1213; __pyx_clineno = __LINE__; goto __pyx_L66_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_L65_exception_handled;
              __pyx_L98_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_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":1218
 *         # 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_26 = __pyx_v_seen_datetime;
      } else {
        __pyx_t_26 = __pyx_v_seen_integer;
      }
      if (__pyx_t_26) {

        /* "pandas/tslib.pyx":1219
 *         # 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_77), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __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 = 1219; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        goto __pyx_L100;
      }
      __pyx_L100:;

      /* "pandas/tslib.pyx":1221
 *             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_43); __pyx_t_43 = 0;
    __Pyx_XDECREF(__pyx_t_42); __pyx_t_42 = 0;
    __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 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":1222
 * 
 *         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 = 1222; __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_3, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_10);

      /* "pandas/tslib.pyx":1223
 *         return result
 *     except OutOfBoundsDatetime:
 *         if raise_:             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
      __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_26 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      if (__pyx_t_26) {

        /* "pandas/tslib.pyx":1224
 *     except OutOfBoundsDatetime:
 *         if raise_:
 *             raise             # <<<<<<<<<<<<<<
 * 
 *         oresult = np.empty(n, dtype=object)
 */
        __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 = 1224; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        goto __pyx_L103;
      }
      __pyx_L103:;

      /* "pandas/tslib.pyx":1226
 *             raise
 * 
 *         oresult = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             val = values[i]
 */
      __pyx_t_41 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_41);
      __pyx_t_42 = PyObject_GetAttr(__pyx_t_41, __pyx_n_s__empty); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_42);
      __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
      __pyx_t_41 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_41);
      __pyx_t_43 = PyTuple_New(1); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_43);
      PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_41);
      __Pyx_GIVEREF(__pyx_t_41);
      __pyx_t_41 = 0;
      __pyx_t_41 = PyDict_New(); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_41));
      if (PyDict_SetItem(__pyx_t_41, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L5_except_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 = 1226; __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_43)); __pyx_t_43 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_41)); __pyx_t_41 = 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 = 1226; __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 = 1226; __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":1227
 * 
 *         oresult = np.empty(n, dtype=object)
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
      __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":1228
 *         oresult = np.empty(n, dtype=object)
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             # set as nan if is even a datetime NaT
 */
        __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 = 1228; __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":1231
 * 
 *             # set as nan if is even a datetime NaT
 *             if _checknull_with_nat(val) or val is np_NaT:             # <<<<<<<<<<<<<<
 *                 oresult[i] = np.nan
 *             elif util.is_datetime64_object(val):
 */
        __pyx_t_26 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val);
        if (!__pyx_t_26) {
          __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np_NaT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_27 = (__pyx_v_val == __pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_2 = __pyx_t_27;
        } else {
          __pyx_t_2 = __pyx_t_26;
        }
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1232
 *             # set as nan if is even a datetime NaT
 *             if _checknull_with_nat(val) or val is np_NaT:
 *                 oresult[i] = np.nan             # <<<<<<<<<<<<<<
 *             elif util.is_datetime64_object(val):
 *                 oresult[i] = val.item()
 */
          __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_41 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__nan); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_41);
          __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 = 1232; __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_41); __Pyx_DECREF(*__pyx_t_51);
          *__pyx_t_51 = __pyx_t_41;
          __Pyx_GIVEREF(*__pyx_t_51);
          __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
          goto __pyx_L106;
        }

        /* "pandas/tslib.pyx":1233
 *             if _checknull_with_nat(val) or val is np_NaT:
 *                 oresult[i] = np.nan
 *             elif 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":1234
 *                 oresult[i] = np.nan
 *             elif util.is_datetime64_object(val):
 *                 oresult[i] = val.item()             # <<<<<<<<<<<<<<
 *             else:
 *                 oresult[i] = val
 */
          __pyx_t_41 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_41);
          __pyx_t_8 = PyObject_Call(__pyx_t_41, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
          __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 = 1234; __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_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;
          goto __pyx_L106;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1236
 *                 oresult[i] = val.item()
 *             else:
 *                 oresult[i] = val             # <<<<<<<<<<<<<<
 *         return oresult
 *     except TypeError:
 */
          __pyx_t_53 = __pyx_v_i;
          __pyx_t_12 = -1;
          if (__pyx_t_53 < 0) {
            __pyx_t_53 += __pyx_pybuffernd_oresult.diminfo[0].shape;
            if (unlikely(__pyx_t_53 < 0)) __pyx_t_12 = 0;
          } else if (unlikely(__pyx_t_53 >= __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 = 1236; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          }
          __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_53, __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":1237
 *             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_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L4_exception_handled;
    }

    /* "pandas/tslib.pyx":1238
 *                 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_10, &__pyx_t_3, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_9);

      /* "pandas/tslib.pyx":1239
 *         return oresult
 *     except TypeError:
 *         oresult = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_41 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__empty); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_41);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_43 = PyTuple_New(1); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_43);
      PyTuple_SET_ITEM(__pyx_t_43, 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 = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __pyx_t_42 = PyObject_Call(__pyx_t_41, ((PyObject *)__pyx_t_43), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_42);
      __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 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 = 1239; __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 = 1239; __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":1241
 *         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":1242
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             if _checknull_with_nat(val):
 *                 oresult[i] = val
 */
        __pyx_t_54 = __pyx_v_i;
        __pyx_t_12 = -1;
        if (__pyx_t_54 < 0) {
          __pyx_t_54 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_54 < 0)) __pyx_t_12 = 0;
        } else if (unlikely(__pyx_t_54 >= __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 = 1242; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        }
        __pyx_t_42 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_54, __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":1243
 *         for i in range(n):
 *             val = values[i]
 *             if _checknull_with_nat(val):             # <<<<<<<<<<<<<<
 *                 oresult[i] = val
 *             elif util.is_string_object(val):
 */
        __pyx_t_2 = __pyx_f_6pandas_5tslib__checknull_with_nat(__pyx_v_val);
        if (__pyx_t_2) {

          /* "pandas/tslib.pyx":1244
 *             val = values[i]
 *             if _checknull_with_nat(val):
 *                 oresult[i] = val             # <<<<<<<<<<<<<<
 *             elif util.is_string_object(val):
 *                 if len(val) == 0:
 */
          __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 = 1244; __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_v_val); __Pyx_DECREF(*__pyx_t_51);
          *__pyx_t_51 = __pyx_v_val;
          __Pyx_GIVEREF(*__pyx_t_51);
          goto __pyx_L111;
        }

        /* "pandas/tslib.pyx":1245
 *             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":1246
 *                 oresult[i] = val
 *             elif util.is_string_object(val):
 *                 if len(val) == 0:             # <<<<<<<<<<<<<<
 *                     # TODO: ??
 *                     oresult[i] = 'NaT'
 */
          __pyx_t_56 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_56 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __pyx_t_2 = (__pyx_t_56 == 0);
          if (__pyx_t_2) {

            /* "pandas/tslib.pyx":1248
 *                 if len(val) == 0:
 *                     # TODO: ??
 *                     oresult[i] = 'NaT'             # <<<<<<<<<<<<<<
 *                     continue
 *                 try:
 */
            __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 = 1248; __pyx_clineno = __LINE__; goto __pyx_L5_except_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_n_s__NaT); __Pyx_DECREF(*__pyx_t_51);
            *__pyx_t_51 = __pyx_n_s__NaT;
            __Pyx_GIVEREF(*__pyx_t_51);

            /* "pandas/tslib.pyx":1249
 *                     # 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":1250
 *                     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":1251
 *                     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_75); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_42);
              __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_INCREF(__pyx_v_val);
              PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_val);
              __Pyx_GIVEREF(__pyx_v_val);
              __pyx_t_43 = PyDict_New(); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(((PyObject *)__pyx_t_43));
              if (PyDict_SetItem(__pyx_t_43, ((PyObject *)__pyx_n_s__dayfirst), __pyx_v_dayfirst) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __pyx_t_41 = PyObject_Call(__pyx_t_42, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_43)); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_41);
              __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_43)); __pyx_t_43 = 0;
              __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 = 1251; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              }
              __pyx_t_51 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_57, __pyx_pybuffernd_oresult.diminfo[0].strides);
              __Pyx_GOTREF(*__pyx_t_51);
              __Pyx_INCREF(__pyx_t_41); __Pyx_DECREF(*__pyx_t_51);
              *__pyx_t_51 = __pyx_t_41;
              __Pyx_GIVEREF(*__pyx_t_51);
              __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

              /* "pandas/tslib.pyx":1252
 *                 try:
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)
 *                     _pydatetime_to_dts(oresult[i], &dts)             # <<<<<<<<<<<<<<
 *                     _check_dts_bounds(&dts)
 *                 except Exception:
 */
              __pyx_t_58 = __pyx_v_i;
              __pyx_t_12 = -1;
              if (__pyx_t_58 < 0) {
                __pyx_t_58 += __pyx_pybuffernd_oresult.diminfo[0].shape;
                if (unlikely(__pyx_t_58 < 0)) __pyx_t_12 = 0;
              } else if (unlikely(__pyx_t_58 >= __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 = 1252; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              }
              __pyx_t_41 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oresult.rcbuffer->pybuffer.buf, __pyx_t_58, __pyx_pybuffernd_oresult.diminfo[0].strides);
              __Pyx_INCREF((PyObject*)__pyx_t_41);
              __pyx_f_8datetime__pydatetime_to_dts(__pyx_t_41, (&__pyx_v_dts));
              __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;

              /* "pandas/tslib.pyx":1253
 *                     oresult[i] = parse_datetime_string(val, dayfirst=dayfirst)
 *                     _pydatetime_to_dts(oresult[i], &dts)
 *                     _check_dts_bounds(&dts)             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     if raise_:
 */
              __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 = 1253; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
              __Pyx_GOTREF(__pyx_t_41);
              __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 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_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_43); __pyx_t_43 = 0;
            __Pyx_XDECREF(__pyx_t_41); __pyx_t_41 = 0;

            /* "pandas/tslib.pyx":1254
 *                     _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_41, &__pyx_t_43, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
              __Pyx_GOTREF(__pyx_t_41);
              __Pyx_GOTREF(__pyx_t_43);
              __Pyx_GOTREF(__pyx_t_8);

              /* "pandas/tslib.pyx":1255
 *                     _check_dts_bounds(&dts)
 *                 except Exception:
 *                     if raise_:             # <<<<<<<<<<<<<<
 *                         raise
 *                     return values
 */
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1255; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
              if (__pyx_t_2) {

                /* "pandas/tslib.pyx":1256
 *                 except Exception:
 *                     if raise_:
 *                         raise             # <<<<<<<<<<<<<<
 *                     return values
 *                     # oresult[i] = val
 */
                __Pyx_GIVEREF(__pyx_t_41);
                __Pyx_GIVEREF(__pyx_t_43);
                __Pyx_GIVEREF(__pyx_t_8);
                __Pyx_ErrRestore(__pyx_t_41, __pyx_t_43, __pyx_t_8);
                __pyx_t_41 = 0; __pyx_t_43 = 0; __pyx_t_8 = 0; 
                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
                goto __pyx_L123;
              }
              __pyx_L123:;

              /* "pandas/tslib.pyx":1257
 *                     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_41); __pyx_t_41 = 0;
              __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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":1260
 *                     # oresult[i] = val
 *             else:
 *                 if raise_:             # <<<<<<<<<<<<<<
 *                     raise
 *                 return values
 */
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_raise_); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          if (__pyx_t_2) {

            /* "pandas/tslib.pyx":1261
 *             else:
 *                 if raise_:
 *                     raise             # <<<<<<<<<<<<<<
 *                 return values
 * 
 */
            __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 = 1261; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
            goto __pyx_L124;
          }
          __pyx_L124:;

          /* "pandas/tslib.pyx":1262
 *                 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":1264
 *                 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_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_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(__pyx_v_py_dt);
  __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_31array_to_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_30array_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_31array_to_timedelta64 = {__Pyx_NAMESTR("array_to_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_31array_to_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_30array_to_timedelta64)};
static PyObject *__pyx_pw_6pandas_5tslib_31array_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_78;
    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 = 1266; __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 = 1266; __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 = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_30array_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":1266
 *         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_30array_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 = 1266; __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":1274
 *         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":1275
 * 
 *     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 = 1275; __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 = 1275; __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 = 1275; __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 = 1275; __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 = 1275; __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_79)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __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 = 1275; __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":1276
 *     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 = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __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 = 1276; __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 = 1276; __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":1278
 *     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":1279
 * 
 *     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 = 1279; __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 = 1279; __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 = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "pandas/tslib.pyx":1280
 *     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_33convert_to_timedelta(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_33convert_to_timedelta = {__Pyx_NAMESTR("convert_to_timedelta"), (PyCFunction)__pyx_pw_6pandas_5tslib_33convert_to_timedelta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_33convert_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_81;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__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 = 1282; __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 = 1282; __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_32convert_to_timedelta(__pyx_self, __pyx_v_ts, __pyx_v_unit, __pyx_v_coerce);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1282
 *     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_32convert_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":1283
 * 
 * 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 = 1283; __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":1285
 *     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":1302
 *     # 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":1303
 *     """
 *     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 = 1303; __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 = 1303; __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 = 1303; __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 = 1303; __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 = 1303; __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":1304
 *     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":1306
 *     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 = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __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 = 1306; __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 = 1306; __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 = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":1307
 *         # 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 = 1307; __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 = 1307; __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 = 1307; __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 = 1307; __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 = 1307; __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":1308
 *         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 = 1308; __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 = 1308; __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 = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1309
 *             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 = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_83), __pyx_n_s__format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __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 = 1309; __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 = 1309; __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 = 1309; __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 = 1309; __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 = 1309; __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 = 1309; __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":1310
 *     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":1311
 *         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 = 1311; __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 = 1311; __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 = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

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

        /* "pandas/tslib.pyx":1315
 *         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 = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __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 = 1315; __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 = 1315; __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":1316
 *             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 = 1316; __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 = 1316; __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":1317
 *                 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_85); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __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 = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "pandas/tslib.pyx":1318
 *             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 = 1318; __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 = 1318; __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 = 1318; __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 = 1318; __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 = 1318; __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":1320
 *                 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 = 1320; __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 = 1320; __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 = 1320; __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 = 1320; __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":1322
 *                 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_85); 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_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":1323
 * 
 *     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":1324
 *     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 = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

        /* "pandas/tslib.pyx":1325
 *         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 = 1325; __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 = 1325; __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 = 1325; __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 = 1325; __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 = 1325; __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":1326
 *             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_86), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __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 = 1326; __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 = 1326; __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 = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "pandas/tslib.pyx":1327
 *                 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":1329
 *         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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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 = 1329; __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":1331
 *             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":1333
 *             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":1334
 * 
 *     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 = 1334; __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 = 1334; __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 = 1334; __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 = 1334; __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":1335
 *     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 = 1335; __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 = 1335; __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 = 1335; __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":1336
 *         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 = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {

      /* "pandas/tslib.pyx":1337
 *     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 = 1337; __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 = 1337; __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 = 1337; __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 = 1337; __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 = 1337; __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":1338
 *         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_86), ((PyObject *)Py_TYPE(__pyx_v_ts))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __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 = 1338; __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 = 1338; __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 = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "pandas/tslib.pyx":1339
 *             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 = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __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_35repr_timedelta64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_34repr_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_35repr_timedelta64 = {__Pyx_NAMESTR("repr_timedelta64"), (PyCFunction)__pyx_pw_6pandas_5tslib_35repr_timedelta64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_34repr_timedelta64)};
static PyObject *__pyx_pw_6pandas_5tslib_35repr_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":1341
 *     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 = 1341; __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 = 1341; __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_34repr_timedelta64(__pyx_self, __pyx_v_value, __pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_34repr_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":1357
 *    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 = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __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":1360
 * 
 *    # 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 = 1360; __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 = 1360; __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":1361
 *    # 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 = 1361; __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 = 1361; __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 = 1361; __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 = 1361; __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":1362
 *    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 = 1362; __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 = 1362; __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 = 1362; __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 = 1362; __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":1364
 *    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 = 1364; __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 = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1365
 * 
 *    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 = 1365; __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 = 1365; __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 = 1365; __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":1366
 *    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 = 1366; __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 = 1366; __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":1368
 *       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":1370
 *       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 = 1370; __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 = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1371
 * 
 *    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 = 1371; __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 = 1371; __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 = 1371; __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":1372
 *    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 = 1372; __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 = 1372; __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":1374
 *       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":1376
 *       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 = 1376; __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 = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1377
 * 
 *    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 = 1377; __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 = 1377; __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 = 1377; __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":1378
 *    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 = 1378; __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 = 1378; __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":1380
 *       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":1382
 *       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 = 1382; __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 = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1383
 * 
 *    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 = 1383; __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 = 1383; __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":1384
 *    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 = 1384; __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":1386
 *       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":1388
 *       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 = 1388; __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 = 1388; __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 = 1388; __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 = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1389
 * 
 *    if frac == int(frac):
 *       seconds_pretty = "%02d" % seconds             # <<<<<<<<<<<<<<
 *    else:
 *       sp = abs(round(1e6*frac))
 */
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_89), __pyx_v_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __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":1391
 *       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 = 1391; __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 = 1391; __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 = 1391; __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 = 1391; __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 = 1391; __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":1392
 *    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 = 1392; __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_90), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __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":1394
 *       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 = 1394; __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 = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":1395
 * 
 *    if sign < 0:
 *        sign_pretty = "-"             # <<<<<<<<<<<<<<
 *    else:
 *        sign_pretty = ""
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_91));
    __pyx_v_sign_pretty = ((PyObject *)__pyx_kp_s_91);
    goto __pyx_L8;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1397
 *        sign_pretty = "-"
 *    else:
 *        sign_pretty = ""             # <<<<<<<<<<<<<<
 * 
 *    if days or format == 'long':
 */
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
    __pyx_v_sign_pretty = ((PyObject *)__pyx_kp_s_9);
  }
  __pyx_L8:;

  /* "pandas/tslib.pyx":1399
 *        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 = 1399; __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 = 1399; __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 = 1399; __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":1400
 * 
 *    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 = 1400; __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 = 1400; __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 = 1400; __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 = 1400; __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 = 1400; __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 = 1400; __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":1401
 *    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":1402
 *        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 = 1401; __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_92), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __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":1404
 *                                            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 = 1404; __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_93), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __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":1407
 * 
 * 
 *    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 = 1407; __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_94), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __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_37array_strptime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_37array_strptime = {__Pyx_NAMESTR("array_strptime"), (PyCFunction)__pyx_pw_6pandas_5tslib_37array_strptime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_37array_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_95;
    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 = 1410; __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 = 1410; __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 = 1410; __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 = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_36array_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":1410
 * 
 * 
 * def array_strptime(ndarray[object] values, object fmt, coerce=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

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

  /* "pandas/tslib.pyx":1419
 * 
 *     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 = 1419; __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 = 1419; __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 = 1419; __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 = 1419; __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":1420
 *     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 = 1420; __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 = 1420; __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 = 1420; __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 = 1420; __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 = 1420; __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 = 1420; __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 = 1420; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_9) {

            /* "pandas/tslib.pyx":1421
 *     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 = 1421; __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 = 1421; __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 = 1421; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pandas/tslib.pyx":1422
 *         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 = 1422; __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 = 1422; __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 = 1422; __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":1423
 *             _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 = 1423; __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 = 1423; __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 = 1423; __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 = 1423; __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 = 1423; __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 = 1423; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_9) {

            /* "pandas/tslib.pyx":1424
 *             _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 = 1424; __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 = 1424; __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 = 1424; __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":1425
 *         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 = 1425; __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 = 1425; __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":1426
 *             _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 = 1426; __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 = 1426; __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 = 1426; __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 = 1426; __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":1427
 *         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 = 1427; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __pyx_t_10 = (!__pyx_t_9);
          if (__pyx_t_10) {

            /* "pandas/tslib.pyx":1428
 *         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":1429
 *         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 = 1429; __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 = 1429; __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 = 1429; __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 = 1429; __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":1432
 *             # 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 = 1432; __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":1433
 *             # \\, 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 = 1433; __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 = 1433; __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":1434
 *             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_96), Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __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 = 1434; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                if (__pyx_t_10) {

                  /* "pandas/tslib.pyx":1435
 *                 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_97));
                  __Pyx_DECREF(__pyx_v_bad_directive);
                  __pyx_v_bad_directive = ((PyObject *)__pyx_kp_s_97);
                  goto __pyx_L28;
                }
                __pyx_L28:;

                /* "pandas/tslib.pyx":1436
 *                 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":1438
 *                 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 = 1438; __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_98), ((PyObject *)__pyx_t_16)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __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 = 1437; __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 = 1437; __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 = 1437; __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":1440
 *                                     (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 = 1440; __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":1441
 *             # 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_99), __pyx_v_fmt); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __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 = 1441; __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 = 1441; __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 = 1441; __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":1442
 *             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 = 1442; __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 = 1442; __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":1419
 * 
 *     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 = 1419; __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 = 1419; __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 = 1419; __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 = 1419; __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 = 1419; __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_100, NULL);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __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 = 1419; __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":1444
 *             _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 = 1444; __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 = 1444; __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 = 1444; __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 = 1444; __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 = 1444; __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_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __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 = 1444; __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":1445
 * 
 *     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 = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_4 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_k_tuple_101), 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(__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 = 1445; __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 = 1445; __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":1447
 *     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":1449
 *     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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__parse_code_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":1472
 *     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":1473
 * 
 *     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 = 1473; __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":1474
 *     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":1475
 *         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 = 1475; __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 = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_9) {

        /* "pandas/tslib.pyx":1476
 *         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 = 1476; __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 = 1476; __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 = 1476; __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":1477
 *             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":1479
 *                 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":1480
 *         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 = 1480; __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 = 1480; __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 = 1480; __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":1481
 *             if _checknull_with_nat(val):
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *             else:
 *                 val = str(val)
 */
        goto __pyx_L35_continue;
        goto __pyx_L39;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":1483
 *                 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 = 1483; __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 = 1483; __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":1485
 *                 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 = 1485; __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 = 1485; __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 = 1485; __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 = 1485; __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":1486
 * 
 *         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 = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = (!__pyx_t_9);
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1487
 *         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 = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_10) {

        /* "pandas/tslib.pyx":1488
 *         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 = 1488; __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 = 1488; __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 = 1488; __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":1489
 *             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":1491
 *                 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 = 1491; __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 = 1491; __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_102), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __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 = 1490; __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 = 1490; __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 = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L40;
    }
    __pyx_L40:;

    /* "pandas/tslib.pyx":1492
 *             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 = 1492; __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 = 1492; __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 = 1492; __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 = 1492; __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 = 1492; __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 = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_10) {

      /* "pandas/tslib.pyx":1493
 *                              (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 = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_10) {

        /* "pandas/tslib.pyx":1494
 *         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 = 1494; __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 = 1494; __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 = 1494; __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":1495
 *             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":1497
 *                 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 = 1497; __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 = 1497; __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 = 1497; __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 = 1497; __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 = 1497; __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_103), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __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 = 1496; __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 = 1496; __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 = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L42;
    }
    __pyx_L42:;

    /* "pandas/tslib.pyx":1498
 *             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":1499
 *                               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":1500
 *         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":1501
 *         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":1504
 *         # 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":1505
 *         # 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":1508
 *         # 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":1509
 *         # 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 = 1509; __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 = 1509; __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":1510
 *         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 = 1510; __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 = 1510; __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 = 1510; __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":1516
 *             #   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 = 1516; __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 = 1516; __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":1588
 *                     # 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":1518
 *             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":1519
 * 
 *             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 = 1519; __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 = 1519; __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 = 1519; __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 = 1519; __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":1523
 *                 #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":1524
 *                 #[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":1526
 *                     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":1527
 *                 else:
 *                     year += 1900
 *             elif parse_code == 1:             # <<<<<<<<<<<<<<
 *                 year = int(found_dict['Y'])
 *             elif parse_code == 2:
 */
        case 1:

        /* "pandas/tslib.pyx":1528
 *                     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 = 1528; __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 = 1528; __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 = 1528; __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 = 1528; __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":1529
 *             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":1530
 *                 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 = 1530; __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 = 1530; __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 = 1530; __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 = 1530; __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":1531
 *             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":1533
 *             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 = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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":1534
 *             # 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":1536
 *             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 = 1536; __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 = 1536; __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 = 1536; __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 = 1536; __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 = 1536; __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 = 1536; __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 = 1536; __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 = 1536; __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 = 1536; __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":1537
 *             # 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":1539
 *             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 = 1539; __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 = 1539; __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 = 1539; __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 = 1539; __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":1540
 *             # 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":1542
 *             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 = 1542; __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 = 1542; __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 = 1542; __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 = 1542; __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":1543
 *             # 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":1544
 *                 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 = 1544; __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 = 1544; __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 = 1544; __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 = 1544; __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":1545
 *             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 = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __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 = 1545; __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 = 1545; __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":1547
 *                 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 = 1547; __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 = 1547; __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 = 1547; __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_9), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __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 = 1547; __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 = 1547; __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 = 1547; __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":1551
 *                     # 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":1552
 *                     # 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":1553
 *                     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 = 1553; __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 = 1553; __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 = 1553; __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 = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1557
 *                     # 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":1558
 *                     # 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":1559
 *                     if hour != 12:
 *                         hour += 12
 *             elif parse_code == 8:             # <<<<<<<<<<<<<<
 *                 minute = int(found_dict['M'])
 *             elif parse_code == 9:
 */
        case 8:

        /* "pandas/tslib.pyx":1560
 *                         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 = 1560; __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 = 1560; __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 = 1560; __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 = 1560; __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":1561
 *             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":1562
 *                 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 = 1562; __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 = 1562; __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 = 1562; __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 = 1562; __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":1563
 *             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":1564
 *                 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 = 1564; __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":1566
 *                 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 = 1566; __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 = 1566; __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 = 1566; __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 = 1566; __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":1567
 *                 # 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 = 1567; __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 = 1567; __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 = 1567; __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":1568
 *                 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":1569
 *                 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 = 1569; __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 = 1569; __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 = 1569; __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 = 1569; __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 = 1569; __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 = 1569; __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 = 1569; __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 = 1569; __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 = 1569; __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":1570
 *             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":1571
 *                 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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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":1572
 *             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":1573
 *                 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 = 1573; __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 = 1573; __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 = 1573; __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 = 1573; __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":1574
 *             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":1575
 *                 weekday = int(found_dict['w'])
 *                 if weekday == 0:
 *                     weekday = 6             # <<<<<<<<<<<<<<
 *                 else:
 *                     weekday -= 1
 */
          __pyx_v_weekday = 6;
          goto __pyx_L50;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":1577
 *                     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":1578
 *                 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":1579
 *                     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 = 1579; __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 = 1579; __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 = 1579; __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 = 1579; __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":1580
 *             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":1581
 *                 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 = 1581; __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 = 1581; __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 = 1581; __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":1582
 *             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 = 1582; __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 = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1584
 *                 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":1587
 *                 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":1588
 *                     # 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":1591
 *                 # 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 = 1591; __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 = 1591; __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 = 1591; __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":1592
 *                 # 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 = 1592; __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 = 1592; __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 = 1592; __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 = 1592; __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 = 1592; __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 = 1592; __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 = 1592; __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 = 1592; __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 = 1592; __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":1593
 *                 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 = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_10) {

            /* "pandas/tslib.pyx":1597
 *                         # 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 = 1597; __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 = 1597; __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 = 1597; __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 = 1597; __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 = 1597; __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 = 1597; __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 = 1597; __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 = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
            if (__pyx_t_10) {

              /* "pandas/tslib.pyx":1598
 *                         # 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 = 1598; __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 = 1598; __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 = 1598; __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 = 1598; __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 = 1598; __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 = 1598; __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 = 1598; __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":1599
 *                         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":1601
 *                             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":1602
 *                         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":1605
 *         # 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 = 1605; __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 = 1605; __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":1606
 *         # 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":1607
 *         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_105); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __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 = 1607; __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 = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);

      /* "pandas/tslib.pyx":1608
 *             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 = 1608; __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 = 1607; __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 = 1607; __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 = 1607; __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":1612
 *         # 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":1614
 *         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 = 1614; __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 = 1614; __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 = 1614; __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 = 1614; __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 = 1614; __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 = 1614; __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 = 1614; __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 = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "pandas/tslib.pyx":1615
 *             # 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 = 1615; __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 = 1615; __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 = 1615; __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 = 1615; __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 = 1615; __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 = 1615; __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 = 1614; __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 = 1615; __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 = 1615; __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":1618
 *         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 = 1618; __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 = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":1619
 *                # 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 = 1619; __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 = 1619; __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 = 1619; __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 = 1619; __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 = 1619; __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 = 1619; __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 = 1619; __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 = 1619; __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 = 1618; __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 = 1618; __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":1620
 *             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 = 1620; __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 = 1620; __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":1621
 *                 (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 = 1621; __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 = 1621; __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":1622
 *             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 = 1622; __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 = 1622; __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":1623
 *             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":1624
 *             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 = 1624; __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 = 1624; __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 = 1624; __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 = 1624; __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 = 1624; __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 = 1624; __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 = 1624; __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 = 1624; __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 = 1624; __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":1626
 *             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":1627
 * 
 *         dts.year = year
 *         dts.month = month             # <<<<<<<<<<<<<<
 *         dts.day = day
 *         dts.hour = hour
 */
    __pyx_v_dts.month = __pyx_v_month;

    /* "pandas/tslib.pyx":1628
 *         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":1629
 *         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":1630
 *         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":1631
 *         dts.hour = hour
 *         dts.min = minute
 *         dts.sec = second             # <<<<<<<<<<<<<<
 *         dts.us = fraction
 * 
 */
    __pyx_v_dts.sec = __pyx_v_second;

    /* "pandas/tslib.pyx":1632
 *         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":1634
 *         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 = 1634; __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":1635
 * 
 *         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":1636
 *         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 = 1636; __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":1637
 *         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 = 1637; __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":1638
 *             _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 = 1638; __pyx_clineno = __LINE__; goto __pyx_L61_except_error;}
        if (__pyx_t_10) {

          /* "pandas/tslib.pyx":1639
 *         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 = 1639; __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 = 1639; __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 = 1639; __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":1640
 *             if coerce:
 *                 iresult[i] = iNaT
 *                 continue             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
          goto __pyx_L68_except_continue;
          goto __pyx_L69;
        }
        __pyx_L69:;

        /* "pandas/tslib.pyx":1641
 *                 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 = 1641; __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":1643
 *             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":1646
 * 
 * 
 * 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":1652
 *         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":1653
 * 
 *     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":1654
 *     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_107), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __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 = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1656
 *         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":1658
 *     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":1659
 * 
 *     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":1660
 *     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 = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":1661
 *         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 = 1661; __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":1663
 *         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 = 1663; __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":1665
 *         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_39cast_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":1668
 *     """ 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 = 1668; __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 = 1668; __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 = 1668; __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 = 1668; __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":1669
 *         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":1670
 *     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":1671
 *         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 = 1671; __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 = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1672
 *         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":1673
 *     elif unit == 's':
 *         m = 1000000000L
 *         p = 6             # <<<<<<<<<<<<<<
 *     elif unit == 'ms':
 *         m = 1000000L
 */
    __pyx_v_p = 6;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1674
 *         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 = 1674; __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 = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1675
 *         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":1676
 *     elif unit == 'ms':
 *         m = 1000000L
 *         p = 3             # <<<<<<<<<<<<<<
 *     elif unit == 'us':
 *         m = 1000L
 */
    __pyx_v_p = 3;
    goto __pyx_L3;
  }

  /* "pandas/tslib.pyx":1677
 *         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 = 1677; __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 = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1678
 *         p = 3
 *     elif unit == 'us':
 *         m = 1000L             # <<<<<<<<<<<<<<
 *         p = 0
 *     else:
 */
    __Pyx_INCREF(__pyx_int_1000L);
    __pyx_v_m = __pyx_int_1000L;

    /* "pandas/tslib.pyx":1679
 *     elif unit == 'us':
 *         m = 1000L
 *         p = 0             # <<<<<<<<<<<<<<
 *     else:
 *         m = 1L
 */
    __pyx_v_p = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1681
 *         p = 0
 *     else:
 *         m = 1L             # <<<<<<<<<<<<<<
 *         p = 0
 * 
 */
    __Pyx_INCREF(__pyx_int_1L);
    __pyx_v_m = __pyx_int_1L;

    /* "pandas/tslib.pyx":1682
 *     else:
 *         m = 1L
 *         p = 0             # <<<<<<<<<<<<<<
 * 
 *     # just give me the unit back
 */
    __pyx_v_p = 0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1685
 * 
 *     # 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":1686
 *     # 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 = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1690
 *     # 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 = 1690; __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 = 1690; __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":1691
 *     # 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 = 1691; __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":1692
 *     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":1693
 *     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 = 1693; __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 = 1693; __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 = 1693; __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":1694
 *     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 = 1694; __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 = 1694; __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 = 1694; __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 = 1694; __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_39cast_from_unit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_38cast_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_39cast_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 = 1665; __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 = 1665; __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 = 1665; __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_38cast_from_unit(__pyx_self, __pyx_v_ts, __pyx_v_unit);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1665
 *         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_38cast_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 = 1665; __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 = 1665; __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_41cast_to_nanoseconds(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_41cast_to_nanoseconds = {__Pyx_NAMESTR("cast_to_nanoseconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_41cast_to_nanoseconds, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_41cast_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 = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_40cast_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":1696
 *     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_40cast_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":1698
 * 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 = 1698; __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 = 1698; __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":1703
 *         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 = 1703; __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":1705
 *     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 = 1705; __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 = 1705; __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 = 1705; __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 = 1705; __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 = 1705; __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 = 1705; __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 = 1705; __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 = 1705; __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 = 1705; __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":1707
 *     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 = 1707; __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 = 1707; __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 = 1707; __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 = 1707; __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_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __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 = 1707; __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":1708
 * 
 *     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 = 1708; __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 = 1708; __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 = 1708; __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 = 1708; __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 = 1708; __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 = 1708; __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 = 1708; __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 = 1708; __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 = 1708; __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":1710
 *     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 = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = (__pyx_t_2 == 0);
  if (__pyx_t_11) {

    /* "pandas/tslib.pyx":1711
 * 
 *     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":1713
 *         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 = 1713; __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 = 1713; __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":1714
 * 
 *     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":1715
 *     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_108), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __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 = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":1717
 *         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":1718
 * 
 *     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 = 1718; __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":1719
 *     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 = 1719; __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":1720
 *         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 = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pandas/tslib.pyx":1722
 *         _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_43pydt_to_i8(PyObject *__pyx_self, PyObject *__pyx_v_pydt); /*proto*/
static char __pyx_doc_6pandas_5tslib_42pydt_to_i8[] = "\n    Convert to int64 representation compatible with numpy datetime64; converts\n    to UTC\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_43pydt_to_i8 = {__Pyx_NAMESTR("pydt_to_i8"), (PyCFunction)__pyx_pw_6pandas_5tslib_43pydt_to_i8, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_42pydt_to_i8)};
static PyObject *__pyx_pw_6pandas_5tslib_43pydt_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_42pydt_to_i8(__pyx_self, ((PyObject *)__pyx_v_pydt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1728
 * 
 * 
 * def pydt_to_i8(object pydt):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert to int64 representation compatible with numpy datetime64; converts
 */

static PyObject *__pyx_pf_6pandas_5tslib_42pydt_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":1736
 *         _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 = 1736; __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 = 1736; __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":1738
 *     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 = 1738; __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_45i8_to_pydt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_44i8_to_pydt[] = "\n    Inverse of pydt_to_i8\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_45i8_to_pydt = {__Pyx_NAMESTR("i8_to_pydt"), (PyCFunction)__pyx_pw_6pandas_5tslib_45i8_to_pydt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_44i8_to_pydt)};
static PyObject *__pyx_pw_6pandas_5tslib_45i8_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":1740
 *     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 = 1740; __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 = 1740; __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 = 1740; __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_44i8_to_pydt(__pyx_self, __pyx_v_i8, __pyx_v_tzinfo);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_44i8_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":1744
 *     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 = 1744; __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 = 1744; __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 = 1744; __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 = 1744; __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_47tz_convert(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_47tz_convert = {__Pyx_NAMESTR("tz_convert"), (PyCFunction)__pyx_pw_6pandas_5tslib_47tz_convert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_47tz_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 = 1757; __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 = 1757; __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 = 1757; __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 = 1757; __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 = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_46tz_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":1757
 *     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_46tz_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;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  int __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("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 = 1757; __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":1760
 *     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 = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1764
 *         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 = 1764; __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 = 1764; __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":1765
 * 
 *     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 = 1765; __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":1769
 *     # 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 = 1769; __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 = 1769; __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 = 1769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1770
 * 
 *     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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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 = 1770; __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":1771
 *     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 = 1771; __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 = 1771; __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 = 1771; __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 = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":1772
 *         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":1773
 *         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 = 1773; __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":1774
 *             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":1775
 *                 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 = 1775; __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 = 1775; __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 = 1775; __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 = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "pandas/tslib.pyx":1776
 *                 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 = 1776; __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 = 1776; __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 = 1776; __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 = 1775; __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 = 1775; __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":1777
 *                 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 = 1777; __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 = 1777; __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 = 1777; __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 = 1777; __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 = 1778; __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":1779
 *                 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 = 1779; __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 = 1779; __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 = 1779; __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 = 1779; __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":1781
 *                 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 = 1781; __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 = 1781; __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 = 1781; __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 = 1781; __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 = 1781; __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":1782
 *         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 = 1782; __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 = 1782; __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 = 1782; __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 = 1782; __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 = 1782; __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":1783
 *             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 = 1783; __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 = 1783; __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 = 1783; __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 = 1783; __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 = 1783; __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 = 1783; __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 = 1783; __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":1784
 *             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":1785
 *             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_110), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __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 = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "pandas/tslib.pyx":1787
 *                 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 = 1787; __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":1788
 * 
 *             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":1789
 *             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 = 1789; __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":1790
 *             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 = 1790; __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 = 1790; __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 = 1790; __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 = 1790; __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 = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (__pyx_t_4) {

          /* "pandas/tslib.pyx":1791
 *                 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":1792
 *                 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 = 1792; __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":1793
 *                     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 = 1793; __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":1795
 *                 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 = 1795; __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":1797
 *         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 = 1797; __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 = 1797; __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 = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1798
 * 
 *     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":1800
 *         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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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 = 1800; __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":1801
 * 
 *     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 = 1801; __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 = 1801; __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 = 1801; __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 = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1802
 *     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":1803
 *     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 = 1803; __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":1804
 *         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":1805
 *             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 = 1805; __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 = 1805; __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 = 1805; __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 = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);

      /* "pandas/tslib.pyx":1806
 *             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 = 1806; __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 = 1806; __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 = 1806; __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 = 1805; __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 = 1805; __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":1807
 *             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 = 1807; __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 = 1807; __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 = 1807; __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 = 1807; __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 = 1807; __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":1808
 *                           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 = 1808; __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 = 1808; __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 = 1808; __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 = 1808; __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":1809
 *             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":1812
 * 
 *     # 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 = 1812; __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 = 1812; __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 = 1812; __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 = 1812; __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 = 1812; __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":1813
 *     # 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 = 1813; __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 = 1813; __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 = 1813; __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 = 1813; __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 = 1813; __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":1814
 *     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 = 1814; __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 = 1814; __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 = 1814; __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 = 1814; __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 = 1814; __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 = 1814; __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":1815
 *     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":1816
 *     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_111), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __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 = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L16;
  }

  /* "pandas/tslib.pyx":1817
 *     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 = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (__pyx_v_pos == __pyx_t_14);
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":1818
 *         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 = 1818; __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 = 1818; __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 = 1818; __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":1821
 * 
 *     # TODO: this assumed sortedness :/
 *     pos -= 1             # <<<<<<<<<<<<<<
 * 
 *     offset = deltas[pos]
 */
  __pyx_v_pos = (__pyx_v_pos - 1);

  /* "pandas/tslib.pyx":1823
 *     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 = 1823; __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":1824
 * 
 *     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 = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_trans_len = __pyx_t_22;

  /* "pandas/tslib.pyx":1826
 *     cdef Py_ssize_t trans_len = len(trans)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v = utc_dates[i]
 *         if vals[i] == NPY_NAT:
 */
  __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":1827
 * 
 *     for i in range(n):
 *         v = utc_dates[i]             # <<<<<<<<<<<<<<
 *         if vals[i] == NPY_NAT:
 *             result[i] = vals[i]
 */
    __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 = 1827; __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":1828
 *     for i in range(n):
 *         v = utc_dates[i]
 *         if vals[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *             result[i] = vals[i]
 *         else:
 */
    __pyx_t_32 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_32 < 0) {
      __pyx_t_32 += __pyx_pybuffernd_vals.diminfo[0].shape;
      if (unlikely(__pyx_t_32 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_32 >= __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 = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_vals.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":1829
 *         v = utc_dates[i]
 *         if vals[i] == NPY_NAT:
 *             result[i] = vals[i]             # <<<<<<<<<<<<<<
 *         else:
 *             if (pos + 1) < trans_len and v >= trans[pos + 1]:
 */
      __pyx_t_33 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_33 < 0) {
        __pyx_t_33 += __pyx_pybuffernd_vals.diminfo[0].shape;
        if (unlikely(__pyx_t_33 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_33 >= __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 = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_34 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_34 < 0) {
        __pyx_t_34 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_34 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_34 >= __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 = 1829; __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_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_vals.diminfo[0].strides));
      goto __pyx_L19;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":1831
 *             result[i] = vals[i]
 *         else:
 *             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_35 = (__pyx_v_pos + 1);
        __pyx_t_10 = -1;
        if (__pyx_t_35 < 0) {
          __pyx_t_35 += __pyx_pybuffernd_trans.diminfo[0].shape;
          if (unlikely(__pyx_t_35 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_35 >= __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 = 1831; __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_35, __pyx_pybuffernd_trans.diminfo[0].strides)));
        __pyx_t_36 = __pyx_t_3;
      } else {
        __pyx_t_36 = __pyx_t_4;
      }
      if (__pyx_t_36) {

        /* "pandas/tslib.pyx":1832
 *         else:
 *             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":1833
 *             if (pos + 1) < trans_len and v >= trans[pos + 1]:
 *                 pos += 1
 *                 offset = deltas[pos]             # <<<<<<<<<<<<<<
 *             result[i] = v + offset
 * 
 */
        __pyx_t_37 = __pyx_v_pos;
        __pyx_t_10 = -1;
        if (__pyx_t_37 < 0) {
          __pyx_t_37 += __pyx_pybuffernd_deltas.diminfo[0].shape;
          if (unlikely(__pyx_t_37 < 0)) __pyx_t_10 = 0;
        } else if (unlikely(__pyx_t_37 >= __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 = 1833; __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_37, __pyx_pybuffernd_deltas.diminfo[0].strides));
        goto __pyx_L20;
      }
      __pyx_L20:;

      /* "pandas/tslib.pyx":1834
 *                 pos += 1
 *                 offset = deltas[pos]
 *             result[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_38 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_38 < 0) {
        __pyx_t_38 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_38 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_38 >= __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 = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_result.diminfo[0].strides) = (__pyx_v_v + __pyx_v_offset);
    }
    __pyx_L19:;
  }

  /* "pandas/tslib.pyx":1836
 *             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_49tz_convert_single(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_49tz_convert_single = {__Pyx_NAMESTR("tz_convert_single"), (PyCFunction)__pyx_pw_6pandas_5tslib_49tz_convert_single, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_49tz_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 = 1838; __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 = 1838; __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 = 1838; __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 = 1838; __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 = 1838; __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_48tz_convert_single(__pyx_self, __pyx_v_val, __pyx_v_tz1, __pyx_v_tz2);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1838
 *     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_48tz_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":1845
 *         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 = 1845; __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 = 1845; __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":1846
 * 
 *     if not have_pytz:
 *         import pytz             # <<<<<<<<<<<<<<
 * 
 *     if val == NPY_NAT:
 */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1846; __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":1848
 *         import pytz
 * 
 *     if val == NPY_NAT:             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_3 = (__pyx_v_val == __pyx_v_6pandas_5tslib_NPY_NAT);
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1849
 * 
 *     if val == NPY_NAT:
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     # Convert to UTC
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __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":1852
 * 
 *     # 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 = 1852; __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 = 1852; __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 = 1852; __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 = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":1853
 *     # 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":1854
 *     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 = 1854; __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 = 1854; __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 = 1854; __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 = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);

    /* "pandas/tslib.pyx":1855
 *         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 = 1855; __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 = 1855; __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 = 1855; __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 = 1854; __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 = 1854; __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":1856
 *         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 = 1856; __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 = 1856; __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 = 1856; __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 = 1856; __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 = 1856; __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":1857
 *                       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 = 1857; __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 = 1857; __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 = 1857; __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_L5;
  }

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

    /* "pandas/tslib.pyx":1859
 *         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 = 1859; __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 = 1859; __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 = 1859; __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 = 1859; __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 = 1859; __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":1860
 *     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 = 1860; __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 = 1860; __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 = 1860; __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 = 1860; __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 = 1860; __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":1861
 *         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 = 1861; __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 = 1861; __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 = 1861; __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 = 1861; __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 = 1861; __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 = 1861; __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":1862
 *         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":1863
 *         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_112), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __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 = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/tslib.pyx":1864
 *         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 = 1864; __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":1865
 *             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_L5;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":1867
 *         utc_date = val - offset
 *     else:
 *         utc_date = val             # <<<<<<<<<<<<<<
 * 
 *     if _get_zone(tz2) == 'UTC':
 */
    __pyx_v_utc_date = __pyx_v_val;
  }
  __pyx_L5:;

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

    /* "pandas/tslib.pyx":1870
 * 
 *     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 = 1870; __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_L7;
  }
  __pyx_L7:;

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

    /* "pandas/tslib.pyx":1872
 *         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":1873
 *     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 = 1873; __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 = 1873; __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 = 1873; __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 = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);

    /* "pandas/tslib.pyx":1874
 *         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 = 1874; __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 = 1874; __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 = 1874; __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 = 1873; __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 = 1873; __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":1875
 *         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 = 1875; __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 = 1875; __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 = 1875; __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 = 1875; __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 = 1875; __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":1876
 *                       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 = 1876; __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 = 1876; __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_L8;
  }
  __pyx_L8:;

  /* "pandas/tslib.pyx":1878
 *         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 = 1878; __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 = 1878; __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 = 1878; __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 = 1878; __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 = 1878; __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":1879
 *     # 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 = 1879; __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 = 1879; __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 = 1879; __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 = 1879; __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 = 1879; __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":1880
 *     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 = 1880; __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 = 1880; __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 = 1880; __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 = 1880; __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 = 1880; __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 = 1880; __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":1881
 *     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":1882
 *     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_113), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1882; __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 = 1882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "pandas/tslib.pyx":1884
 *         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 = 1884; __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":1885
 * 
 *     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 = 1885; __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_51_get_transitions(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static char __pyx_doc_6pandas_5tslib_50_get_transitions[] = "\n    Get UTC times of DST transitions\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_51_get_transitions = {__Pyx_NAMESTR("_get_transitions"), (PyCFunction)__pyx_pw_6pandas_5tslib_51_get_transitions, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_50_get_transitions)};
static PyObject *__pyx_pw_6pandas_5tslib_51_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_50_get_transitions(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1891
 * utc_offset_cache = {}
 * 
 * def _get_transitions(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC times of DST transitions
 */

static PyObject *__pyx_pf_6pandas_5tslib_50_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":1895
 *     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":1897
 *     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 = 1897; __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":1898
 *         # 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 = 1898; __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":1899
 *         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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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":1901
 *         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 = 1901; __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 = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_14) {

    /* "pandas/tslib.pyx":1902
 * 
 *     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_114);
    __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 = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_14) {

      /* "pandas/tslib.pyx":1903
 *     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 = 1903; __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 = 1903; __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_114); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __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 = 1903; __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 = 1903; __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_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __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 = 1903; __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":1904
 *         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 = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_8 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_k_tuple_115), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; __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":1905
 *             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":1906
 *             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_114); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __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 = 1906; __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 = 1906; __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 = 1906; __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 = 1906; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_14) {

            /* "pandas/tslib.pyx":1907
 *             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 = 1907; __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 = 1907; __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":1908
 *                 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":1911
 *                 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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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 = 1911; __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":1912
 *         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 = 1912; __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 = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "pandas/tslib.pyx":1913
 *             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 = 1913; __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 = 1913; __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_53_get_deltas(PyObject *__pyx_self, PyObject *__pyx_v_tz); /*proto*/
static char __pyx_doc_6pandas_5tslib_52_get_deltas[] = "\n    Get UTC offsets in microseconds corresponding to DST transitions\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_53_get_deltas = {__Pyx_NAMESTR("_get_deltas"), (PyCFunction)__pyx_pw_6pandas_5tslib_53_get_deltas, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_52_get_deltas)};
static PyObject *__pyx_pw_6pandas_5tslib_53_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_52_get_deltas(__pyx_self, ((PyObject *)__pyx_v_tz));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1915
 *     return trans_cache[tz]
 * 
 * def _get_deltas(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC offsets in microseconds corresponding to DST transitions
 */

static PyObject *__pyx_pf_6pandas_5tslib_52_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":1919
 *     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":1921
 *     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 = 1921; __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":1922
 *         # 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 = 1922; __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":1923
 *         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 = 1923; __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 = 1923; __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 = 1923; __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 = 1923; __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 = 1923; __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":1924
 *     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 = 1924; __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 = 1924; __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 = 1924; __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 = 1924; __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 = 1924; __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 = 1924; __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 = 1924; __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 = 1924; __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 = 1924; __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":1926
 *         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 = 1926; __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 = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_14) {

    /* "pandas/tslib.pyx":1927
 * 
 *     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_114);
    __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 = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_14) {

      /* "pandas/tslib.pyx":1928
 *     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 = 1928; __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 = 1928; __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 = 1928; __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 = 1928; __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":1931
 *         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 = 1931; __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 = 1931; __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 = 1931; __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 = 1931; __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 = 1931; __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":1932
 *             # 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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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 = 1932; __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":1934
 *             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 = 1934; __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 = 1934; __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":1936
 *     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":1937
 * 
 * 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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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 = 1937; __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_55tot_seconds(PyObject *__pyx_self, PyObject *__pyx_v_td); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_55tot_seconds = {__Pyx_NAMESTR("tot_seconds"), (PyCFunction)__pyx_pw_6pandas_5tslib_55tot_seconds, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_55tot_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_54tot_seconds(__pyx_self, ((PyObject *)__pyx_v_td));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1940
 *             10**6)
 * 
 * def tot_seconds(td):             # <<<<<<<<<<<<<<
 *     return total_seconds(td)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_54tot_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":1941
 * 
 * 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 = 1941; __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":1943
 *     return total_seconds(td)
 * 
 * cpdef ndarray _unbox_utcoffsets(object transinfo):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pw_6pandas_5tslib_57_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":1948
 *         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 = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_sz = __pyx_t_1;

  /* "pandas/tslib.pyx":1949
 * 
 *     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 = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __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 = 1949; __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":1951
 *     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":1952
 * 
 *     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 = 1952; __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 = 1952; __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 = 1952; __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 = 1952; __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 = 1952; __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 = 1952; __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 = 1952; __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 = 1952; __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":1954
 *         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_57_unbox_utcoffsets(PyObject *__pyx_self, PyObject *__pyx_v_transinfo); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_57_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_56_unbox_utcoffsets(__pyx_self, ((PyObject *)__pyx_v_transinfo));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":1943
 *     return total_seconds(td)
 * 
 * cpdef ndarray _unbox_utcoffsets(object transinfo):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static PyObject *__pyx_pf_6pandas_5tslib_56_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 = 1943; __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_59tz_localize_to_utc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_58tz_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_59tz_localize_to_utc = {__Pyx_NAMESTR("tz_localize_to_utc"), (PyCFunction)__pyx_pw_6pandas_5tslib_59tz_localize_to_utc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_58tz_localize_to_utc)};
static PyObject *__pyx_pw_6pandas_5tslib_59tz_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 = 1959; __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 = 1959; __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 = 1959; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "pandas/tslib.pyx":1959
 * @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 = 1959; __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 = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_58tz_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_58tz_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;
  Py_ssize_t __pyx_t_45;
  Py_ssize_t __pyx_t_46;
  Py_ssize_t __pyx_t_47;
  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 = 1959; __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":1970
 *     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 = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":1978
 *     # 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 = 1978; __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 = 1978; __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":1979
 * 
 *     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_117), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __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 = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":1981
 *         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 = 1981; __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 = 1981; __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 = 1981; __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":1982
 * 
 *     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":1984
 *         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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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 = 1984; __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":1986
 *     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 = 1986; __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 = 1986; __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 = 1986; __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 = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_6) {

    /* "pandas/tslib.pyx":1987
 * 
 *     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":1988
 *     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":1989
 *         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":1990
 *             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 = 1990; __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 = 1990; __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 = 1990; __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 = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);

      /* "pandas/tslib.pyx":1991
 *             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 = 1991; __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 = 1991; __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 = 1991; __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 = 1990; __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 = 1990; __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":1992
 *             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 = 1992; __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 = 1992; __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 = 1992; __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 = 1992; __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 = 1992; __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":1993
 *                           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 = 1993; __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 = 1993; __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 = 1993; __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":1994
 *             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":1996
 *         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 = 1996; __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 = 1996; __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 = 1996; __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 = 1996; __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 = 1996; __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":1997
 * 
 *     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 = 1997; __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 = 1997; __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 = 1997; __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 = 1997; __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 = 1997; __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":1999
 *     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":2000
 * 
 *     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 = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ntrans = __pyx_t_1;

  /* "pandas/tslib.pyx":2002
 *     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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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 = 2002; __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":2003
 * 
 *     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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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 = 2003; __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":2004
 *     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 = 2004; __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 = 2004; __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 = 2004; __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 = 2004; __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":2005
 *     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 = 2005; __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 = 2005; __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 = 2005; __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 = 2005; __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":2009
 *     # 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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2009; __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 = 2008; __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 = 2008; __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 = 2008; __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":2011
 *         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":2012
 * 
 *     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":2013
 *     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 = 2013; __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 = 2013; __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 = 2013; __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":2016
 * 
 *         # 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":2017
 *         # 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":2021
 *     # 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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2021; __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 = 2020; __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 = 2020; __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 = 2020; __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":2023
 *         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":2024
 * 
 *     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":2025
 *     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 = 2025; __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 = 2025; __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 = 2025; __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":2028
 * 
 *         # 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":2029
 *         # 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":2032
 * 
 * 
 *     if infer_dst:             # <<<<<<<<<<<<<<
 *         dst_hours = np.empty(n, dtype=np.int64)
 *         dst_hours.fill(NPY_NAT)
 */
  if (__pyx_v_infer_dst) {

    /* "pandas/tslib.pyx":2033
 * 
 *     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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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":2034
 *     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 = 2034; __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 = 2034; __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 = 2034; __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 = 2034; __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":2038
 *         # 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 = 2038; __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 = 2038; __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 = 2038; __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 = 2038; __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 = 2038; __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 = 2038; __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 = 2038; __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 = 2038; __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":2039
 *         # 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 = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_both_eq = __pyx_t_17;
    __pyx_t_17 = 0;

    /* "pandas/tslib.pyx":2040
 *         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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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":2041
 *         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 = 2041; __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 = 2041; __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 = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":2042
 *         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 = 2042; __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 = 2042; __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 = 2042; __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 = 2042; __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":2043
 *         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 = 2043; __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 = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

      /* "pandas/tslib.pyx":2044
 *             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_118), __pyx_v_stamp); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __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 = 2043; __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 = 2043; __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 = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "pandas/tslib.pyx":2049
 *         # 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 = 2049; __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 = 2049; __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 = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":2050
 *         # 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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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 = 2050; __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":2051
 *         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 = 2051; __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 = 2051; __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 = 2051; __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 = 2051; __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":2055
 *             # 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 = 2055; __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 = 2055; __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 = 2055; __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 = 2055; __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 = 2055; __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 = 2055; __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":2057
 *             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 = 2057; __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 = 2057; __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 = 2057; __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 = 2057; __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 = 2057; __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":2058
 * 
 *                 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 = 2058; __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 = 2058; __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 = 2058; __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 = 2058; __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 = 2058; __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 = 2058; __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 = 2058; __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 = 2058; __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 = 2058; __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":2059
 *                 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 = 2059; __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 = 2059; __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 = 2059; __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 = 2059; __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 = 2059; __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":2060
 *                 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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L19;
        }
        __pyx_L19:;

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

          /* "pandas/tslib.pyx":2065
 *                 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 = 2065; __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 = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pandas/tslib.pyx":2067
 *                     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 = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_119), __pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2067; __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 = 2065; __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 = 2065; __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 = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L20;
        }
        __pyx_L20:;

        /* "pandas/tslib.pyx":2068
 *                                                   "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 = 2068; __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 = 2068; __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":2069
 *                                                   % 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 = 2069; __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 = 2069; __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":2070
 *                 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 = 2070; __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 = 2070; __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":2071
 *                 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 = 2071; __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 = 2071; __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 = 2071; __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 = 2071; __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 = 2071; __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 = 2071; __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 = 2071; __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 = 2071; __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":2073
 *                 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":2074
 * 
 *     for i in range(n):
 *         left = result_a[i]             # <<<<<<<<<<<<<<
 *         right = result_b[i]
 *         if vals[i] == 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":2075
 *     for i in range(n):
 *         left = result_a[i]
 *         right = result_b[i]             # <<<<<<<<<<<<<<
 *         if vals[i] == NPY_NAT:
 *             result[i] = vals[i]
 */
    __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":2076
 *         left = result_a[i]
 *         right = result_b[i]
 *         if vals[i] == NPY_NAT:             # <<<<<<<<<<<<<<
 *             result[i] = vals[i]
 *         elif left != NPY_NAT and right != NPY_NAT:
 */
    __pyx_t_37 = __pyx_v_i;
    __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_vals.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
    if (__pyx_t_3) {

      /* "pandas/tslib.pyx":2077
 *         right = result_b[i]
 *         if vals[i] == NPY_NAT:
 *             result[i] = vals[i]             # <<<<<<<<<<<<<<
 *         elif left != NPY_NAT and right != NPY_NAT:
 *             if left == right:
 */
      __pyx_t_38 = __pyx_v_i;
      __pyx_t_39 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_39, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_vals.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_vals.diminfo[0].strides));
      goto __pyx_L23;
    }

    /* "pandas/tslib.pyx":2078
 *         if vals[i] == NPY_NAT:
 *             result[i] = vals[i]
 *         elif 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":2079
 *             result[i] = vals[i]
 *         elif 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":2080
 *         elif 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_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_v_left;
        goto __pyx_L24;
      }
      /*else*/ {

        /* "pandas/tslib.pyx":2082
 *                 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_41 = __pyx_v_i;
          __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_41, __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":2083
 *             else:
 *                 if infer_dst and dst_hours[i] != NPY_NAT:
 *                     result[i] = dst_hours[i]             # <<<<<<<<<<<<<<
 *                 else:
 *                     stamp = Timestamp(vals[i])
 */
          __pyx_t_42 = __pyx_v_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_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dst_hours.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_dst_hours.diminfo[0].strides));
          goto __pyx_L25;
        }
        /*else*/ {

          /* "pandas/tslib.pyx":2085
 *                     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 = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_44 = __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_44, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2085; __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 = 2085; __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 = 2085; __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":2086
 *                 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 = 2086; __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 = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

          /* "pandas/tslib.pyx":2088
 *                     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_120), __pyx_v_stamp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2088; __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 = 2086; __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 = 2086; __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 = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_L25:;
      }
      __pyx_L24:;
      goto __pyx_L23;
    }

    /* "pandas/tslib.pyx":2089
 *                                                   "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":2090
 *                                                   % stamp)
 *         elif left != NPY_NAT:
 *             result[i] = left             # <<<<<<<<<<<<<<
 *         elif right != NPY_NAT:
 *             result[i] = right
 */
      __pyx_t_45 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_left;
      goto __pyx_L23;
    }

    /* "pandas/tslib.pyx":2091
 *         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":2092
 *             result[i] = left
 *         elif right != NPY_NAT:
 *             result[i] = right             # <<<<<<<<<<<<<<
 *         else:
 *             stamp = Timestamp(vals[i])
 */
      __pyx_t_46 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_right;
      goto __pyx_L23;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2094
 *             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 = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_47 = __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_47, __pyx_pybuffernd_vals.diminfo[0].strides))); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __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 = 2094; __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 = 2094; __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":2095
 *         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 = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_8 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s_121); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2095; __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 = 2095; __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 = 2095; __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 = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L23:;
  }

  /* "pandas/tslib.pyx":2097
 *             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":2099
 *     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":2100
 * 
 * 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 = 2100; __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 = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "pandas/tslib.pyx":2101
 * 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":2102
 *     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":2104
 *             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 = 2104; __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 = 2104; __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 = 2104; __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 = 2104; __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 = 2104; __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":2106
 *             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 = 2106; __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 = 2106; __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 = 2106; __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 = 2106; __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 = 2106; __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 = 2106; __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 = 2106; __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 = 2106; __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":2109
 * 
 * 
 * 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":2110
 * 
 * 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":2113
 * 
 *     # 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":2114
 *     # 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 = 2114; __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":2116
 *         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":2117
 * 
 *     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":2119
 *         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":2120
 * 
 *     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":2122
 *         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":2123
 * 
 *         if data[pivot] <= val:
 *             left = pivot + 1             # <<<<<<<<<<<<<<
 *         else:
 *             right = pivot
 */
      __pyx_v_left = (__pyx_v_pivot + 1);
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2125
 *             left = pivot + 1
 *         else:
 *             right = pivot             # <<<<<<<<<<<<<<
 * 
 *     return left
 */
      __pyx_v_right = __pyx_v_pivot;
    }
    __pyx_L7:;
  }

  /* "pandas/tslib.pyx":2127
 *             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 = 2127; __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_61build_field_sarray(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/
static char __pyx_doc_6pandas_5tslib_60build_field_sarray[] = "\n    Datetime as int64 representation to a structured array of fields\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_61build_field_sarray = {__Pyx_NAMESTR("build_field_sarray"), (PyCFunction)__pyx_pw_6pandas_5tslib_61build_field_sarray, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_60build_field_sarray)};
static PyObject *__pyx_pw_6pandas_5tslib_61build_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 = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_60build_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":2133
 * #----------------------------------------------------------------------
 * 
 * def build_field_sarray(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */

static PyObject *__pyx_pf_6pandas_5tslib_60build_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 = 2133; __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":2138
 *     '''
 *     cdef:
 *         Py_ssize_t i, count = 0             # <<<<<<<<<<<<<<
 *         int isleap
 *         pandas_datetimestruct dts
 */
  __pyx_v_count = 0;

  /* "pandas/tslib.pyx":2143
 *         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 = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_count = __pyx_t_1;

  /* "pandas/tslib.pyx":2151
 *                 ('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 = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_122));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_k_tuple_122));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_123));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_k_tuple_123));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_124));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_k_tuple_124));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_125));
  PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_k_tuple_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_126));
  PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_k_tuple_126));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_127));
  PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_k_tuple_127));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_128));
  PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_k_tuple_128));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));
  __pyx_v_sa_dtype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":2153
 *                 ('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 = 2153; __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 = 2153; __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 = 2153; __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 = 2153; __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 = 2153; __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 = 2153; __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 = 2153; __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":2155
 *     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 = 2155; __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 = 2155; __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 = 2155; __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":2156
 * 
 *     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 = 2156; __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 = 2156; __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 = 2156; __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":2157
 *     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 = 2157; __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 = 2157; __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 = 2157; __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":2158
 *     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 = 2158; __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 = 2158; __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 = 2158; __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":2159
 *     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 = 2159; __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 = 2159; __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 = 2159; __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":2160
 *     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 = 2160; __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 = 2160; __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 = 2160; __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":2161
 *     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 = 2161; __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 = 2161; __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 = 2161; __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":2163
 *     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":2164
 * 
 *     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 = 2164; __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":2165
 *     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 = 2165; __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":2166
 *         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 = 2166; __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":2167
 *         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 = 2167; __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":2168
 *         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 = 2168; __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":2169
 *         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 = 2169; __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":2170
 *         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 = 2170; __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":2171
 *         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 = 2171; __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":2173
 *         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_63get_time_micros(PyObject *__pyx_self, PyObject *__pyx_v_dtindex); /*proto*/
static char __pyx_doc_6pandas_5tslib_62get_time_micros[] = "\n    Datetime as int64 representation to a structured array of fields\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_63get_time_micros = {__Pyx_NAMESTR("get_time_micros"), (PyCFunction)__pyx_pw_6pandas_5tslib_63get_time_micros, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_62get_time_micros)};
static PyObject *__pyx_pw_6pandas_5tslib_63get_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 = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_62get_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":2175
 *     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_62get_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 = 2175; __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":2180
 *     '''
 *     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 = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2184
 *         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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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 = 2184; __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":2186
 *     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":2187
 * 
 *     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 = 2187; __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":2188
 *     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 = 2188; __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":2191
 *                                  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_65get_date_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_64get_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_65get_date_field = {__Pyx_NAMESTR("get_date_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_65get_date_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_64get_date_field)};
static PyObject *__pyx_pw_6pandas_5tslib_65get_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 = 2194; __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 = 2194; __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 = 2194; __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 = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_64get_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":2194
 * 
 * @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_64get_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 = 2194; __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":2201
 *     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":2208
 *         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 = 2208; __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 = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":2209
 * 
 *     _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 = 2209; __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":2210
 *     _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 = 2210; __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 = 2209; __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 = 2208; __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":2208
 *         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 = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "pandas/tslib.pyx":2211
 *         [[ 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 = 2211; __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 = 2211; __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 = 2208; __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 = 2208; __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 = 2208; __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 = 2208; __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":2213
 *          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 = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_count = __pyx_t_11;

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

    /* "pandas/tslib.pyx":2217
 * 
 *     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":2218
 *     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 = 2218; __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 = 2218; __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":2220
 *             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 = 2220; __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":2221
 * 
 *             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 = 2221; __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":2222
 *             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":2224
 *         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 = 2224; __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 = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2225
 * 
 *     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":2226
 *     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 = 2226; __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 = 2226; __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":2228
 *             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 = 2228; __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":2229
 * 
 *             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 = 2229; __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":2230
 *             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":2232
 *         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 = 2232; __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 = 2232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2233
 * 
 *     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":2234
 *     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 = 2234; __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 = 2234; __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":2236
 *             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 = 2236; __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":2237
 * 
 *             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 = 2237; __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":2238
 *             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":2240
 *         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 = 2240; __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 = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2241
 * 
 *     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":2242
 *     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 = 2242; __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 = 2242; __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":2244
 *             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 = 2244; __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":2245
 * 
 *             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 = 2245; __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":2246
 *             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":2248
 *         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 = 2248; __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 = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2249
 * 
 *     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":2250
 *     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 = 2250; __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 = 2250; __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":2252
 *             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 = 2252; __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":2253
 * 
 *             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 = 2253; __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":2254
 *             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":2256
 *         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 = 2256; __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 = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2257
 * 
 *     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":2258
 *     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 = 2258; __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 = 2258; __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":2260
 *             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 = 2260; __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":2261
 * 
 *             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 = 2261; __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":2262
 *             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":2264
 *         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 = 2264; __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 = 2264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2265
 * 
 *     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":2266
 *     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 = 2266; __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 = 2266; __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":2268
 *             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 = 2268; __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":2269
 * 
 *             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 = 2269; __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":2270
 *             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":2271
 *             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 = 2271; __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 = 2271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2272
 *         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":2273
 *     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 = 2273; __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 = 2273; __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":2275
 *             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 = 2275; __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":2276
 * 
 *             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 = 2276; __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":2277
 *             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":2278
 *             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 = 2278; __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 = 2278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2279
 *         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":2280
 *     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 = 2280; __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 = 2280; __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":2282
 *             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 = 2282; __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":2283
 * 
 *             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":2284
 *             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 = 2284; __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 = 2284; __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":2285
 *             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":2287
 *         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 = 2287; __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 = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2288
 * 
 *     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":2289
 *     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 = 2289; __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 = 2289; __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":2291
 *             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 = 2291; __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 = 2291; __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 = 2291; __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 = 2291; __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":2292
 * 
 *             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 = 2292; __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":2293
 *             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":2295
 *         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 = 2295; __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 = 2295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2296
 * 
 *     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":2297
 *     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 = 2297; __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 = 2297; __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":2299
 *             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 = 2299; __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":2300
 * 
 *             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 = 2300; __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 = 2300; __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 = 2300; __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 = 2300; __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":2301
 *             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":2302
 *             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":2303
 *             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 = 2303; __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":2304
 *             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":2305
 *             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":2308
 * 
 *             #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":2309
 *             #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":2310
 *             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":2313
 * 
 *             # 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":2314
 *             # 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":2315
 *             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":2317
 *                     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":2318
 *                 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":2319
 *                     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":2320
 *             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":2322
 *                     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 = 2322; __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":2323
 * 
 *             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":2325
 *         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 = 2325; __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 = 2325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_65) {

    /* "pandas/tslib.pyx":2326
 * 
 *     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":2327
 *     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 = 2327; __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 = 2327; __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":2329
 *             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 = 2329; __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":2330
 * 
 *             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 = 2330; __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":2331
 *             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 = 2331; __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 = 2331; __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":2332
 *             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":2334
 *         return out
 * 
 *     raise ValueError("Field %s not supported" % field)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_129), __pyx_v_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __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 = 2334; __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 = 2334; __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 = 2334; __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;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_5tslib_67get_start_end_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_66get_start_end_field[] = "\n    Given an int64-based datetime index return array of indicators\n    of whether timestamps are at the start/end of the month/quarter/year\n    (defined by frequency).\n    ";
static PyMethodDef __pyx_mdef_6pandas_5tslib_67get_start_end_field = {__Pyx_NAMESTR("get_start_end_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_67get_start_end_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_66get_start_end_field)};
static PyObject *__pyx_pw_6pandas_5tslib_67get_start_end_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_dtindex = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_freqstr = 0;
  int __pyx_v_month_kw;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_start_end_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dtindex,&__pyx_n_s__field,&__pyx_n_s__freqstr,&__pyx_n_s__month_kw,0};
    PyObject* values[4] = {0,0,0,0};

    /* "pandas/tslib.pyx":2338
 * 
 * @cython.wraparound(False)
 * def get_start_end_field(ndarray[int64_t] dtindex, object field, object freqstr=None, int month_kw=12):             # <<<<<<<<<<<<<<
 *     '''
 *     Given an int64-based datetime index return array of indicators
 */
    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  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__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_start_end_field", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__freqstr);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__month_kw);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_start_end_field") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __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_dtindex = ((PyArrayObject *)values[0]);
    __pyx_v_field = values[1];
    __pyx_v_freqstr = values[2];
    if (values[3]) {
      __pyx_v_month_kw = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_month_kw == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_month_kw = ((int)12);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_start_end_field", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas.tslib.get_start_end_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 = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_66get_start_end_field(__pyx_self, __pyx_v_dtindex, __pyx_v_field, __pyx_v_freqstr, __pyx_v_month_kw);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_66get_start_end_field(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dtindex, PyObject *__pyx_v_field, PyObject *__pyx_v_freqstr, int __pyx_v_month_kw) {
  struct __pyx_obj_6pandas_5tslib__TSObject *__pyx_v_ts = 0;
  Py_ssize_t __pyx_v_i;
  int __pyx_v_count;
  int __pyx_v_is_business;
  int __pyx_v_end_month;
  int __pyx_v_start_month;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v__month_offset = 0;
  int __pyx_v_isleap;
  pandas_datetimestruct __pyx_v_dts;
  int __pyx_v_mo_off;
  int __pyx_v_dom;
  int __pyx_v_doy;
  int __pyx_v_dow;
  int __pyx_v_ldom;
  __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;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  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;
  int __pyx_t_33;
  int __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;
  long __pyx_t_39;
  npy_int32 __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;
  npy_int32 __pyx_t_46;
  int __pyx_t_47;
  int __pyx_t_48;
  int __pyx_t_49;
  Py_ssize_t __pyx_t_50;
  Py_ssize_t __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;
  Py_ssize_t __pyx_t_58;
  long __pyx_t_59;
  int __pyx_t_60;
  int __pyx_t_61;
  Py_ssize_t __pyx_t_62;
  Py_ssize_t __pyx_t_63;
  Py_ssize_t __pyx_t_64;
  Py_ssize_t __pyx_t_65;
  long __pyx_t_66;
  npy_int32 __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;
  npy_int32 __pyx_t_73;
  int __pyx_t_74;
  int __pyx_t_75;
  Py_ssize_t __pyx_t_76;
  Py_ssize_t __pyx_t_77;
  Py_ssize_t __pyx_t_78;
  Py_ssize_t __pyx_t_79;
  Py_ssize_t __pyx_t_80;
  Py_ssize_t __pyx_t_81;
  Py_ssize_t __pyx_t_82;
  Py_ssize_t __pyx_t_83;
  Py_ssize_t __pyx_t_84;
  long __pyx_t_85;
  int __pyx_t_86;
  int __pyx_t_87;
  Py_ssize_t __pyx_t_88;
  Py_ssize_t __pyx_t_89;
  Py_ssize_t __pyx_t_90;
  Py_ssize_t __pyx_t_91;
  Py_ssize_t __pyx_t_92;
  long __pyx_t_93;
  npy_int32 __pyx_t_94;
  Py_ssize_t __pyx_t_95;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_start_end_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 = 2338; __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":2347
 *         _TSObject ts
 *         Py_ssize_t i
 *         int count = 0             # <<<<<<<<<<<<<<
 *         bint is_business = 0
 *         int end_month = 12
 */
  __pyx_v_count = 0;

  /* "pandas/tslib.pyx":2348
 *         Py_ssize_t i
 *         int count = 0
 *         bint is_business = 0             # <<<<<<<<<<<<<<
 *         int end_month = 12
 *         int start_month = 1
 */
  __pyx_v_is_business = 0;

  /* "pandas/tslib.pyx":2349
 *         int count = 0
 *         bint is_business = 0
 *         int end_month = 12             # <<<<<<<<<<<<<<
 *         int start_month = 1
 *         ndarray[int8_t] out
 */
  __pyx_v_end_month = 12;

  /* "pandas/tslib.pyx":2350
 *         bint is_business = 0
 *         int end_month = 12
 *         int start_month = 1             # <<<<<<<<<<<<<<
 *         ndarray[int8_t] out
 *         ndarray[int32_t, ndim=2] _month_offset
 */
  __pyx_v_start_month = 1;

  /* "pandas/tslib.pyx":2357
 *         int mo_off, dom, doy, dow, ldom
 * 
 *     _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 = 2357; __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 = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":2358
 * 
 *     _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 = 2358; __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":2359
 *     _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 = 2359; __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 = 2358; __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 = 2357; __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":2357
 *         int mo_off, dom, doy, dow, ldom
 * 
 *     _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 = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "pandas/tslib.pyx":2360
 *         [[ 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 = 2360; __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 = 2360; __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 = 2357; __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 = 2357; __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 = 2357; __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 = 2357; __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":2362
 *          dtype=np.int32 )
 * 
 *     count = len(dtindex)             # <<<<<<<<<<<<<<
 *     out = np.zeros(count, dtype='int8')
 * 
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_dtindex)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_count = __pyx_t_11;

  /* "pandas/tslib.pyx":2363
 * 
 *     count = len(dtindex)
 *     out = np.zeros(count, dtype='int8')             # <<<<<<<<<<<<<<
 * 
 *     if freqstr:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __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_FromLong(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __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 = 2363; __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 = 2363; __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__int8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __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 = 2363; __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 = 2363; __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_int8_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_int8_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 = 2363; __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":2365
 *     out = np.zeros(count, dtype='int8')
 * 
 *     if freqstr:             # <<<<<<<<<<<<<<
 *         if freqstr == 'C':
 *             raise ValueError("Custom business days is not supported by %s" % field)
 */
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_freqstr); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2366
 * 
 *     if freqstr:
 *         if freqstr == 'C':             # <<<<<<<<<<<<<<
 *             raise ValueError("Custom business days is not supported by %s" % field)
 *         is_business = freqstr[0] == 'B'
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_freqstr, ((PyObject *)__pyx_n_s__C), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2366; __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 = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_13) {

      /* "pandas/tslib.pyx":2367
 *     if freqstr:
 *         if freqstr == 'C':
 *             raise ValueError("Custom business days is not supported by %s" % field)             # <<<<<<<<<<<<<<
 *         is_business = freqstr[0] == 'B'
 * 
 */
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_130), __pyx_v_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __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 = 2367; __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 = 2367; __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 = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "pandas/tslib.pyx":2368
 *         if freqstr == 'C':
 *             raise ValueError("Custom business days is not supported by %s" % field)
 *         is_business = freqstr[0] == 'B'             # <<<<<<<<<<<<<<
 * 
 *         # YearBegin(), BYearBegin() use month = starting month of year
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_freqstr, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__B), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_is_business = __pyx_t_13;

    /* "pandas/tslib.pyx":2374
 *         # other offests use month, startingMonth as ending month of year.
 * 
 *         if (freqstr[0:2] in ['MS', 'QS', 'AS']) or (freqstr[1:3] in ['MS', 'QS', 'AS']):             # <<<<<<<<<<<<<<
 *             end_month = 12 if month_kw == 1 else month_kw - 1
 *             start_month = month_kw
 */
    __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_freqstr, 0, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__MS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!((int)__pyx_t_13)) {
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__QS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_15 = ((int)__pyx_t_14);
    } else {
      __pyx_t_15 = ((int)__pyx_t_13);
    }
    if (!__pyx_t_15) {
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__AS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_14 = ((int)__pyx_t_13);
    } else {
      __pyx_t_14 = __pyx_t_15;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_15 = __pyx_t_14;
    if (!__pyx_t_15) {
      __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_freqstr, 1, 3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__MS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!((int)__pyx_t_14)) {
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__QS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_16 = ((int)__pyx_t_13);
      } else {
        __pyx_t_16 = ((int)__pyx_t_14);
      }
      if (!__pyx_t_16) {
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__AS), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_13 = ((int)__pyx_t_14);
      } else {
        __pyx_t_13 = __pyx_t_16;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_16 = __pyx_t_13;
      __pyx_t_13 = __pyx_t_16;
    } else {
      __pyx_t_13 = __pyx_t_15;
    }
    if (__pyx_t_13) {

      /* "pandas/tslib.pyx":2375
 * 
 *         if (freqstr[0:2] in ['MS', 'QS', 'AS']) or (freqstr[1:3] in ['MS', 'QS', 'AS']):
 *             end_month = 12 if month_kw == 1 else month_kw - 1             # <<<<<<<<<<<<<<
 *             start_month = month_kw
 *         else:
 */
      if ((__pyx_v_month_kw == 1)) {
        __pyx_t_17 = 12;
      } else {
        __pyx_t_17 = (__pyx_v_month_kw - 1);
      }
      __pyx_v_end_month = __pyx_t_17;

      /* "pandas/tslib.pyx":2376
 *         if (freqstr[0:2] in ['MS', 'QS', 'AS']) or (freqstr[1:3] in ['MS', 'QS', 'AS']):
 *             end_month = 12 if month_kw == 1 else month_kw - 1
 *             start_month = month_kw             # <<<<<<<<<<<<<<
 *         else:
 *             end_month = month_kw
 */
      __pyx_v_start_month = __pyx_v_month_kw;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2378
 *             start_month = month_kw
 *         else:
 *             end_month = month_kw             # <<<<<<<<<<<<<<
 *             start_month = (end_month % 12) + 1
 *     else:
 */
      __pyx_v_end_month = __pyx_v_month_kw;

      /* "pandas/tslib.pyx":2379
 *         else:
 *             end_month = month_kw
 *             start_month = (end_month % 12) + 1             # <<<<<<<<<<<<<<
 *     else:
 *         end_month = 12
 */
      __pyx_v_start_month = (__Pyx_mod_long(__pyx_v_end_month, 12) + 1);
    }
    __pyx_L5:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2381
 *             start_month = (end_month % 12) + 1
 *     else:
 *         end_month = 12             # <<<<<<<<<<<<<<
 *         start_month = 1
 * 
 */
    __pyx_v_end_month = 12;

    /* "pandas/tslib.pyx":2382
 *     else:
 *         end_month = 12
 *         start_month = 1             # <<<<<<<<<<<<<<
 * 
 *     if field == 'is_month_start':
 */
    __pyx_v_start_month = 1;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2384
 *         start_month = 1
 * 
 *     if field == 'is_month_start':             # <<<<<<<<<<<<<<
 *         if is_business:
 *             for i in range(count):
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__is_month_start), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2385
 * 
 *     if field == 'is_month_start':
 *         if is_business:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
    if (__pyx_v_is_business) {

      /* "pandas/tslib.pyx":2386
 *     if field == 'is_month_start':
 *         if is_business:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2387
 *         if is_business:
 *             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_18 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_18 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2387; __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_18, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_13) {
          __pyx_t_20 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_20 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L8_continue;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "pandas/tslib.pyx":2389
 *                 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)
 *                 dom = dts.day
 */
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __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_21, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2390
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 dow = ts_dayofweek(ts)
 */
        __pyx_t_22 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_22 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __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_dtindex.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __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_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_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 = 2390; __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":2391
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 dow = ts_dayofweek(ts)
 * 
 */
        __pyx_t_23 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_23;

        /* "pandas/tslib.pyx":2392
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 dom = dts.day
 *                 dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 *                 if (dom == 1 and dow < 5) or (dom <= 3 and dow == 0):
 */
        __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

        /* "pandas/tslib.pyx":2394
 *                 dow = ts_dayofweek(ts)
 * 
 *                 if (dom == 1 and dow < 5) or (dom <= 3 and dow == 0):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_13 = (__pyx_v_dom == 1);
        if (__pyx_t_13) {
          __pyx_t_15 = (__pyx_v_dow < 5);
          __pyx_t_16 = __pyx_t_15;
        } else {
          __pyx_t_16 = __pyx_t_13;
        }
        if (!__pyx_t_16) {
          __pyx_t_13 = (__pyx_v_dom <= 3);
          if (__pyx_t_13) {
            __pyx_t_15 = (__pyx_v_dow == 0);
            __pyx_t_14 = __pyx_t_15;
          } else {
            __pyx_t_14 = __pyx_t_13;
          }
          __pyx_t_13 = __pyx_t_14;
        } else {
          __pyx_t_13 = __pyx_t_16;
        }
        if (__pyx_t_13) {

          /* "pandas/tslib.pyx":2395
 * 
 *                 if (dom == 1 and dow < 5) or (dom <= 3 and dow == 0):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 *         else:
 */
          __pyx_t_24 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L11;
        }
        __pyx_L11:;
        __pyx_L8_continue:;
      }

      /* "pandas/tslib.pyx":2396
 *                 if (dom == 1 and dow < 5) or (dom <= 3 and dow == 0):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(count):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __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_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2398
 *             return out.view(bool)
 *         else:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2399
 *         else:
 *             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_19 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2399; __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_19 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L12_continue;
          goto __pyx_L14;
        }
        __pyx_L14:;

        /* "pandas/tslib.pyx":2401
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 * 
 */
        __pyx_t_27 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_27 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; __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":2402
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 * 
 *                 if dom == 1:
 */
        __pyx_t_23 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_23;

        /* "pandas/tslib.pyx":2404
 *                 dom = dts.day
 * 
 *                 if dom == 1:             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_13 = (__pyx_v_dom == 1);
        if (__pyx_t_13) {

          /* "pandas/tslib.pyx":2405
 * 
 *                 if dom == 1:
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 * 
 */
          __pyx_t_28 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L15;
        }
        __pyx_L15:;
        __pyx_L12_continue:;
      }

      /* "pandas/tslib.pyx":2406
 *                 if dom == 1:
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'is_month_end':
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2406; __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 = 2406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_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 = 2406; __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_L7:;
    goto __pyx_L6;
  }

  /* "pandas/tslib.pyx":2408
 *             return out.view(bool)
 * 
 *     elif field == 'is_month_end':             # <<<<<<<<<<<<<<
 *         if is_business:
 *             for i in range(count):
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__is_month_end), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2408; __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 = 2408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_13) {

    /* "pandas/tslib.pyx":2409
 * 
 *     elif field == 'is_month_end':
 *         if is_business:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
    if (__pyx_v_is_business) {

      /* "pandas/tslib.pyx":2410
 *     elif field == 'is_month_end':
 *         if is_business:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2411
 *         if is_business:
 *             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_19 = -1;
        if (__pyx_t_29 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __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_19 = -1;
          if (__pyx_t_30 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L17_continue;
          goto __pyx_L19;
        }
        __pyx_L19:;

        /* "pandas/tslib.pyx":2413
 *                 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_31 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_31 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2413; __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":2414
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 */
        __pyx_t_32 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_32 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __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_32, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = Py_None;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v_ts));
        __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pandas/tslib.pyx":2415
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 */
        __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

        /* "pandas/tslib.pyx":2416
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 doy = mo_off + dom
 */
        __pyx_t_13 = __pyx_v_isleap;
        __pyx_t_17 = (__pyx_v_dts.month - 1);
        __pyx_t_19 = -1;
        if (__pyx_t_13 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_17 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __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_13, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2417
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 */
        __pyx_t_23 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_23;

        /* "pandas/tslib.pyx":2418
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 *                 doy = mo_off + dom             # <<<<<<<<<<<<<<
 *                 ldom = _month_offset[isleap, dts.month]
 *                 dow = ts_dayofweek(ts)
 */
        __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dom);

        /* "pandas/tslib.pyx":2419
 *                 dom = dts.day
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]             # <<<<<<<<<<<<<<
 *                 dow = ts_dayofweek(ts)
 * 
 */
        __pyx_t_16 = __pyx_v_isleap;
        __pyx_t_23 = __pyx_v_dts.month;
        __pyx_t_19 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_23 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_ldom = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2420
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 *                 dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 *                 if (ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2)):
 */
        __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

        /* "pandas/tslib.pyx":2422
 *                 dow = ts_dayofweek(ts)
 * 
 *                 if (ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2)):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_14 = (__pyx_v_ldom == __pyx_v_doy);
        if (__pyx_t_14) {
          __pyx_t_15 = (__pyx_v_dow < 5);
          __pyx_t_33 = __pyx_t_15;
        } else {
          __pyx_t_33 = __pyx_t_14;
        }
        if (!__pyx_t_33) {
          __pyx_t_14 = (__pyx_v_dow == 4);
          if (__pyx_t_14) {
            __pyx_t_15 = ((__pyx_v_ldom - __pyx_v_doy) <= 2);
            __pyx_t_34 = __pyx_t_15;
          } else {
            __pyx_t_34 = __pyx_t_14;
          }
          __pyx_t_14 = __pyx_t_34;
        } else {
          __pyx_t_14 = __pyx_t_33;
        }
        if (__pyx_t_14) {

          /* "pandas/tslib.pyx":2423
 * 
 *                 if (ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2)):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 *         else:
 */
          __pyx_t_35 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_35 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L20;
        }
        __pyx_L20:;
        __pyx_L17_continue:;
      }

      /* "pandas/tslib.pyx":2424
 *                 if (ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2)):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(count):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L16;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2426
 *             return out.view(bool)
 *         else:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2427
 *         else:
 *             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_36 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_36 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_14) {
          __pyx_t_37 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_37 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_37, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L21_continue;
          goto __pyx_L23;
        }
        __pyx_L23:;

        /* "pandas/tslib.pyx":2429
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 */
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_38 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __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_38, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2430
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 */
        __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

        /* "pandas/tslib.pyx":2431
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 doy = mo_off + dom
 */
        __pyx_t_14 = __pyx_v_isleap;
        __pyx_t_39 = (__pyx_v_dts.month - 1);
        __pyx_t_19 = -1;
        if (__pyx_t_14 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_39 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __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_14, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2432
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 */
        __pyx_t_40 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_40;

        /* "pandas/tslib.pyx":2433
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 *                 doy = mo_off + dom             # <<<<<<<<<<<<<<
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 */
        __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dom);

        /* "pandas/tslib.pyx":2434
 *                 dom = dts.day
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]             # <<<<<<<<<<<<<<
 * 
 *                 if ldom == doy:
 */
        __pyx_t_33 = __pyx_v_isleap;
        __pyx_t_40 = __pyx_v_dts.month;
        __pyx_t_19 = -1;
        if (__pyx_t_33 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_40 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_ldom = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_40, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2436
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 *                 if ldom == doy:             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_34 = (__pyx_v_ldom == __pyx_v_doy);
        if (__pyx_t_34) {

          /* "pandas/tslib.pyx":2437
 * 
 *                 if ldom == doy:
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 * 
 */
          __pyx_t_41 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_41 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L24;
        }
        __pyx_L24:;
        __pyx_L21_continue:;
      }

      /* "pandas/tslib.pyx":2438
 *                 if ldom == doy:
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'is_quarter_start':
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __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 = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
    __pyx_L16:;
    goto __pyx_L6;
  }

  /* "pandas/tslib.pyx":2440
 *             return out.view(bool)
 * 
 *     elif field == 'is_quarter_start':             # <<<<<<<<<<<<<<
 *         if is_business:
 *             for i in range(count):
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__is_quarter_start), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_34) {

    /* "pandas/tslib.pyx":2441
 * 
 *     elif field == 'is_quarter_start':
 *         if is_business:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
    if (__pyx_v_is_business) {

      /* "pandas/tslib.pyx":2442
 *     elif field == 'is_quarter_start':
 *         if is_business:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2443
 *         if is_business:
 *             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_42 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_42 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_34 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_34) {
          __pyx_t_43 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_43 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_43, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L26_continue;
          goto __pyx_L28;
        }
        __pyx_L28:;

        /* "pandas/tslib.pyx":2445
 *                 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)
 *                 dom = dts.day
 */
        __pyx_t_44 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_44 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2445; __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_44, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2446
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 dow = ts_dayofweek(ts)
 */
        __pyx_t_45 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_45 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __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_dtindex.rcbuffer->pybuffer.buf, __pyx_t_45, __pyx_pybuffernd_dtindex.diminfo[0].strides))); 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_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_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_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 = 2446; __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":2447
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 dow = ts_dayofweek(ts)
 * 
 */
        __pyx_t_46 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_46;

        /* "pandas/tslib.pyx":2448
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 dom = dts.day
 *                 dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 *                 if ((dts.month - start_month) % 3 == 0) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):
 */
        __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

        /* "pandas/tslib.pyx":2450
 *                 dow = ts_dayofweek(ts)
 * 
 *                 if ((dts.month - start_month) % 3 == 0) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_34 = (__Pyx_mod_long((__pyx_v_dts.month - __pyx_v_start_month), 3) == 0);
        if (__pyx_t_34) {
          __pyx_t_15 = (__pyx_v_dom == 1);
          if (__pyx_t_15) {
            __pyx_t_47 = (__pyx_v_dow < 5);
            __pyx_t_48 = __pyx_t_47;
          } else {
            __pyx_t_48 = __pyx_t_15;
          }
          if (!__pyx_t_48) {
            __pyx_t_15 = (__pyx_v_dom <= 3);
            if (__pyx_t_15) {
              __pyx_t_47 = (__pyx_v_dow == 0);
              __pyx_t_49 = __pyx_t_47;
            } else {
              __pyx_t_49 = __pyx_t_15;
            }
            __pyx_t_15 = __pyx_t_49;
          } else {
            __pyx_t_15 = __pyx_t_48;
          }
          __pyx_t_48 = __pyx_t_15;
        } else {
          __pyx_t_48 = __pyx_t_34;
        }
        if (__pyx_t_48) {

          /* "pandas/tslib.pyx":2451
 * 
 *                 if ((dts.month - start_month) % 3 == 0) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 *         else:
 */
          __pyx_t_50 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_50 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_50 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_50, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L29;
        }
        __pyx_L29:;
        __pyx_L26_continue:;
      }

      /* "pandas/tslib.pyx":2452
 *                 if ((dts.month - start_month) % 3 == 0) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(count):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; __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_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L25;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2454
 *             return out.view(bool)
 *         else:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2455
 *         else:
 *             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_51 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_51 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_51 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_48 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_51, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_48) {
          __pyx_t_52 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_52 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L30_continue;
          goto __pyx_L32;
        }
        __pyx_L32:;

        /* "pandas/tslib.pyx":2457
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 * 
 */
        __pyx_t_53 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_53 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __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_53, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2458
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 * 
 *                 if ((dts.month - start_month) % 3 == 0) and dom == 1:
 */
        __pyx_t_46 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_46;

        /* "pandas/tslib.pyx":2460
 *                 dom = dts.day
 * 
 *                 if ((dts.month - start_month) % 3 == 0) and dom == 1:             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_48 = (__Pyx_mod_long((__pyx_v_dts.month - __pyx_v_start_month), 3) == 0);
        if (__pyx_t_48) {
          __pyx_t_34 = (__pyx_v_dom == 1);
          __pyx_t_15 = __pyx_t_34;
        } else {
          __pyx_t_15 = __pyx_t_48;
        }
        if (__pyx_t_15) {

          /* "pandas/tslib.pyx":2461
 * 
 *                 if ((dts.month - start_month) % 3 == 0) and dom == 1:
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 * 
 */
          __pyx_t_54 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_54 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_54, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L33;
        }
        __pyx_L33:;
        __pyx_L30_continue:;
      }

      /* "pandas/tslib.pyx":2462
 *                 if ((dts.month - start_month) % 3 == 0) and dom == 1:
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'is_quarter_end':
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __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 = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_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 = 2462; __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_L25:;
    goto __pyx_L6;
  }

  /* "pandas/tslib.pyx":2464
 *             return out.view(bool)
 * 
 *     elif field == 'is_quarter_end':             # <<<<<<<<<<<<<<
 *         if is_business:
 *             for i in range(count):
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__is_quarter_end), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_15) {

    /* "pandas/tslib.pyx":2465
 * 
 *     elif field == 'is_quarter_end':
 *         if is_business:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
    if (__pyx_v_is_business) {

      /* "pandas/tslib.pyx":2466
 *     elif field == 'is_quarter_end':
 *         if is_business:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2467
 *         if is_business:
 *             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_55 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_55 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_55 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_15 = ((*__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_15) {
          __pyx_t_56 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_56 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_56 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_56, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L35_continue;
          goto __pyx_L37;
        }
        __pyx_L37:;

        /* "pandas/tslib.pyx":2469
 *                 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_57 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_57 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_57 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2469; __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_57, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2470
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 */
        __pyx_t_58 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_58 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_58 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2470; __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_58, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = Py_None;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2470; __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v_ts));
        __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pandas/tslib.pyx":2471
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 */
        __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

        /* "pandas/tslib.pyx":2472
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 doy = mo_off + dom
 */
        __pyx_t_15 = __pyx_v_isleap;
        __pyx_t_59 = (__pyx_v_dts.month - 1);
        __pyx_t_19 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_59 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_59 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2472; __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_15, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_59, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2473
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 */
        __pyx_t_46 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_46;

        /* "pandas/tslib.pyx":2474
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 *                 doy = mo_off + dom             # <<<<<<<<<<<<<<
 *                 ldom = _month_offset[isleap, dts.month]
 *                 dow = ts_dayofweek(ts)
 */
        __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dom);

        /* "pandas/tslib.pyx":2475
 *                 dom = dts.day
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]             # <<<<<<<<<<<<<<
 *                 dow = ts_dayofweek(ts)
 * 
 */
        __pyx_t_48 = __pyx_v_isleap;
        __pyx_t_46 = __pyx_v_dts.month;
        __pyx_t_19 = -1;
        if (__pyx_t_48 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_46 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_ldom = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_46, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2476
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 *                 dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 *                 if ((dts.month - end_month) % 3 == 0) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):
 */
        __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

        /* "pandas/tslib.pyx":2478
 *                 dow = ts_dayofweek(ts)
 * 
 *                 if ((dts.month - end_month) % 3 == 0) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_34 = (__Pyx_mod_long((__pyx_v_dts.month - __pyx_v_end_month), 3) == 0);
        if (__pyx_t_34) {
          __pyx_t_49 = (__pyx_v_ldom == __pyx_v_doy);
          if (__pyx_t_49) {
            __pyx_t_47 = (__pyx_v_dow < 5);
            __pyx_t_60 = __pyx_t_47;
          } else {
            __pyx_t_60 = __pyx_t_49;
          }
          if (!__pyx_t_60) {
            __pyx_t_49 = (__pyx_v_dow == 4);
            if (__pyx_t_49) {
              __pyx_t_47 = ((__pyx_v_ldom - __pyx_v_doy) <= 2);
              __pyx_t_61 = __pyx_t_47;
            } else {
              __pyx_t_61 = __pyx_t_49;
            }
            __pyx_t_49 = __pyx_t_61;
          } else {
            __pyx_t_49 = __pyx_t_60;
          }
          __pyx_t_60 = __pyx_t_49;
        } else {
          __pyx_t_60 = __pyx_t_34;
        }
        if (__pyx_t_60) {

          /* "pandas/tslib.pyx":2479
 * 
 *                 if ((dts.month - end_month) % 3 == 0) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 *         else:
 */
          __pyx_t_62 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_62 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_62 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_62, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L38;
        }
        __pyx_L38:;
        __pyx_L35_continue:;
      }

      /* "pandas/tslib.pyx":2480
 *                 if ((dts.month - end_month) % 3 == 0) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(count):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L34;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2482
 *             return out.view(bool)
 *         else:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2483
 *         else:
 *             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_63 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_63 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_63 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_60 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_63, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_60) {
          __pyx_t_64 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_64 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_64 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_64, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L39_continue;
          goto __pyx_L41;
        }
        __pyx_L41:;

        /* "pandas/tslib.pyx":2485
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 */
        __pyx_t_65 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_65 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_65 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2485; __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_65, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2486
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 */
        __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

        /* "pandas/tslib.pyx":2487
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 doy = mo_off + dom
 */
        __pyx_t_60 = __pyx_v_isleap;
        __pyx_t_66 = (__pyx_v_dts.month - 1);
        __pyx_t_19 = -1;
        if (__pyx_t_60 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_60 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_66 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_66 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2487; __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_60, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_66, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2488
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 */
        __pyx_t_67 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_67;

        /* "pandas/tslib.pyx":2489
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 *                 doy = mo_off + dom             # <<<<<<<<<<<<<<
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 */
        __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dom);

        /* "pandas/tslib.pyx":2490
 *                 dom = dts.day
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]             # <<<<<<<<<<<<<<
 * 
 *                 if ((dts.month - end_month) % 3 == 0) and (ldom == doy):
 */
        __pyx_t_34 = __pyx_v_isleap;
        __pyx_t_67 = __pyx_v_dts.month;
        __pyx_t_19 = -1;
        if (__pyx_t_34 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_67 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_67 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_ldom = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_67, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2492
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 *                 if ((dts.month - end_month) % 3 == 0) and (ldom == doy):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_49 = (__Pyx_mod_long((__pyx_v_dts.month - __pyx_v_end_month), 3) == 0);
        if (__pyx_t_49) {
          __pyx_t_61 = (__pyx_v_ldom == __pyx_v_doy);
          __pyx_t_47 = __pyx_t_61;
        } else {
          __pyx_t_47 = __pyx_t_49;
        }
        if (__pyx_t_47) {

          /* "pandas/tslib.pyx":2493
 * 
 *                 if ((dts.month - end_month) % 3 == 0) and (ldom == doy):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 * 
 */
          __pyx_t_68 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_68 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_68 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_68, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L42;
        }
        __pyx_L42:;
        __pyx_L39_continue:;
      }

      /* "pandas/tslib.pyx":2494
 *                 if ((dts.month - end_month) % 3 == 0) and (ldom == doy):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'is_year_start':
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __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 = 2494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }
    __pyx_L34:;
    goto __pyx_L6;
  }

  /* "pandas/tslib.pyx":2496
 *             return out.view(bool)
 * 
 *     elif field == 'is_year_start':             # <<<<<<<<<<<<<<
 *         if is_business:
 *             for i in range(count):
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__is_year_start), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_47 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_47 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_47) {

    /* "pandas/tslib.pyx":2497
 * 
 *     elif field == 'is_year_start':
 *         if is_business:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
    if (__pyx_v_is_business) {

      /* "pandas/tslib.pyx":2498
 *     elif field == 'is_year_start':
 *         if is_business:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2499
 *         if is_business:
 *             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_69 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_69 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_69 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_47 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_69, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_47) {
          __pyx_t_70 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_70 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_70 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_70, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L44_continue;
          goto __pyx_L46;
        }
        __pyx_L46:;

        /* "pandas/tslib.pyx":2501
 *                 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)
 *                 dom = dts.day
 */
        __pyx_t_71 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_71 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_71 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2501; __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_71, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2502
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 dow = ts_dayofweek(ts)
 */
        __pyx_t_72 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_72 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_72 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __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_dtindex.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __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_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_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 = 2502; __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":2503
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 dow = ts_dayofweek(ts)
 * 
 */
        __pyx_t_73 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_73;

        /* "pandas/tslib.pyx":2504
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 dom = dts.day
 *                 dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 * 
 *                 if (dts.month == start_month) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):
 */
        __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

        /* "pandas/tslib.pyx":2506
 *                 dow = ts_dayofweek(ts)
 * 
 *                 if (dts.month == start_month) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_47 = (__pyx_v_dts.month == __pyx_v_start_month);
        if (__pyx_t_47) {
          __pyx_t_49 = (__pyx_v_dom == 1);
          if (__pyx_t_49) {
            __pyx_t_61 = (__pyx_v_dow < 5);
            __pyx_t_74 = __pyx_t_61;
          } else {
            __pyx_t_74 = __pyx_t_49;
          }
          if (!__pyx_t_74) {
            __pyx_t_49 = (__pyx_v_dom <= 3);
            if (__pyx_t_49) {
              __pyx_t_61 = (__pyx_v_dow == 0);
              __pyx_t_75 = __pyx_t_61;
            } else {
              __pyx_t_75 = __pyx_t_49;
            }
            __pyx_t_49 = __pyx_t_75;
          } else {
            __pyx_t_49 = __pyx_t_74;
          }
          __pyx_t_74 = __pyx_t_49;
        } else {
          __pyx_t_74 = __pyx_t_47;
        }
        if (__pyx_t_74) {

          /* "pandas/tslib.pyx":2507
 * 
 *                 if (dts.month == start_month) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 *         else:
 */
          __pyx_t_76 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_76 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_76 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_76, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L47;
        }
        __pyx_L47:;
        __pyx_L44_continue:;
      }

      /* "pandas/tslib.pyx":2508
 *                 if (dts.month == start_month) and ((dom == 1 and dow < 5) or (dom <= 3 and dow == 0)):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(count):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2508; __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_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
      goto __pyx_L43;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2510
 *             return out.view(bool)
 *         else:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2511
 *         else:
 *             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_77 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_77 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_77 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_74 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_77, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_74) {
          __pyx_t_78 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_78 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_78 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_78, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L48_continue;
          goto __pyx_L50;
        }
        __pyx_L50:;

        /* "pandas/tslib.pyx":2513
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 * 
 */
        __pyx_t_79 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_79 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_79 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __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_79, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2514
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 * 
 *                 if (dts.month == start_month) and dom == 1:
 */
        __pyx_t_73 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_73;

        /* "pandas/tslib.pyx":2516
 *                 dom = dts.day
 * 
 *                 if (dts.month == start_month) and dom == 1:             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_74 = (__pyx_v_dts.month == __pyx_v_start_month);
        if (__pyx_t_74) {
          __pyx_t_47 = (__pyx_v_dom == 1);
          __pyx_t_49 = __pyx_t_47;
        } else {
          __pyx_t_49 = __pyx_t_74;
        }
        if (__pyx_t_49) {

          /* "pandas/tslib.pyx":2517
 * 
 *                 if (dts.month == start_month) and dom == 1:
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 * 
 */
          __pyx_t_80 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_80 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_80 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_80, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L51;
        }
        __pyx_L51:;
        __pyx_L48_continue:;
      }

      /* "pandas/tslib.pyx":2518
 *                 if (dts.month == start_month) and dom == 1:
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 * 
 *     elif field == 'is_year_end':
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2518; __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 = 2518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_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 = 2518; __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_L43:;
    goto __pyx_L6;
  }

  /* "pandas/tslib.pyx":2520
 *             return out.view(bool)
 * 
 *     elif field == 'is_year_end':             # <<<<<<<<<<<<<<
 *         if is_business:
 *             for i in range(count):
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_field, ((PyObject *)__pyx_n_s__is_year_end), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_49 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_49 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_49) {

    /* "pandas/tslib.pyx":2521
 * 
 *     elif field == 'is_year_end':
 *         if is_business:             # <<<<<<<<<<<<<<
 *             for i in range(count):
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 */
    if (__pyx_v_is_business) {

      /* "pandas/tslib.pyx":2522
 *     elif field == 'is_year_end':
 *         if is_business:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2523
 *         if is_business:
 *             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_81 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_81 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_81 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_49 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_81, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_49) {
          __pyx_t_82 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_82 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_82 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_82, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L53_continue;
          goto __pyx_L55;
        }
        __pyx_L55:;

        /* "pandas/tslib.pyx":2525
 *                 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_83 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_83 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_83 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; __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_83, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2526
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 isleap = is_leapyear(dts.year)
 *                 dom = dts.day
 */
        __pyx_t_84 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_84 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_84 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __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_84, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = Py_None;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5tslib__TSObject))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v_ts));
        __pyx_v_ts = ((struct __pyx_obj_6pandas_5tslib__TSObject *)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pandas/tslib.pyx":2527
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 */
        __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

        /* "pandas/tslib.pyx":2528
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 doy = mo_off + dom
 */
        __pyx_t_73 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_73;

        /* "pandas/tslib.pyx":2529
 *                 isleap = is_leapyear(dts.year)
 *                 dom = dts.day
 *                 mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *                 doy = mo_off + dom
 *                 dow = ts_dayofweek(ts)
 */
        __pyx_t_49 = __pyx_v_isleap;
        __pyx_t_85 = (__pyx_v_dts.month - 1);
        __pyx_t_19 = -1;
        if (__pyx_t_49 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_85 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_85 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2529; __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_49, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_85, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2530
 *                 dom = dts.day
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 doy = mo_off + dom             # <<<<<<<<<<<<<<
 *                 dow = ts_dayofweek(ts)
 *                 ldom = _month_offset[isleap, dts.month]
 */
        __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dom);

        /* "pandas/tslib.pyx":2531
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 doy = mo_off + dom
 *                 dow = ts_dayofweek(ts)             # <<<<<<<<<<<<<<
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 */
        __pyx_v_dow = __pyx_f_6pandas_5tslib_ts_dayofweek(__pyx_v_ts);

        /* "pandas/tslib.pyx":2532
 *                 doy = mo_off + dom
 *                 dow = ts_dayofweek(ts)
 *                 ldom = _month_offset[isleap, dts.month]             # <<<<<<<<<<<<<<
 * 
 *                 if (dts.month == end_month) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):
 */
        __pyx_t_74 = __pyx_v_isleap;
        __pyx_t_73 = __pyx_v_dts.month;
        __pyx_t_19 = -1;
        if (__pyx_t_74 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_74 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_73 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_73 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_ldom = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_74, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_73, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2534
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 *                 if (dts.month == end_month) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_47 = (__pyx_v_dts.month == __pyx_v_end_month);
        if (__pyx_t_47) {
          __pyx_t_75 = (__pyx_v_ldom == __pyx_v_doy);
          if (__pyx_t_75) {
            __pyx_t_61 = (__pyx_v_dow < 5);
            __pyx_t_86 = __pyx_t_61;
          } else {
            __pyx_t_86 = __pyx_t_75;
          }
          if (!__pyx_t_86) {
            __pyx_t_75 = (__pyx_v_dow == 4);
            if (__pyx_t_75) {
              __pyx_t_61 = ((__pyx_v_ldom - __pyx_v_doy) <= 2);
              __pyx_t_87 = __pyx_t_61;
            } else {
              __pyx_t_87 = __pyx_t_75;
            }
            __pyx_t_75 = __pyx_t_87;
          } else {
            __pyx_t_75 = __pyx_t_86;
          }
          __pyx_t_86 = __pyx_t_75;
        } else {
          __pyx_t_86 = __pyx_t_47;
        }
        if (__pyx_t_86) {

          /* "pandas/tslib.pyx":2535
 * 
 *                 if (dts.month == end_month) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 *         else:
 */
          __pyx_t_88 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_88 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_88 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_88, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L56;
        }
        __pyx_L56:;
        __pyx_L53_continue:;
      }

      /* "pandas/tslib.pyx":2536
 *                 if (dts.month == end_month) and ((ldom == doy and dow < 5) or (dow == 4 and (ldom - doy <= 2))):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(count):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L52;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":2538
 *             return out.view(bool)
 *         else:
 *             for i in range(count):             # <<<<<<<<<<<<<<
 *                 if dtindex[i] == NPY_NAT: out[i] = -1; continue
 * 
 */
      __pyx_t_7 = __pyx_v_count;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_7; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "pandas/tslib.pyx":2539
 *         else:
 *             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_89 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_89 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_89 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_86 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_89, __pyx_pybuffernd_dtindex.diminfo[0].strides)) == __pyx_v_6pandas_5tslib_NPY_NAT);
        if (__pyx_t_86) {
          __pyx_t_90 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_90 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_90 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_90, __pyx_pybuffernd_out.diminfo[0].strides) = -1;
          goto __pyx_L57_continue;
          goto __pyx_L59;
        }
        __pyx_L59:;

        /* "pandas/tslib.pyx":2541
 *                 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_91 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_91 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_91 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2541; __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_91, __pyx_pybuffernd_dtindex.diminfo[0].strides)), PANDAS_FR_ns, (&__pyx_v_dts));

        /* "pandas/tslib.pyx":2542
 * 
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)             # <<<<<<<<<<<<<<
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 */
        __pyx_t_92 = __pyx_v_i;
        __pyx_t_19 = -1;
        if (__pyx_t_92 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_92 >= __pyx_pybuffernd_dtindex.diminfo[0].shape)) __pyx_t_19 = 0;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dtindex.rcbuffer->pybuffer.buf, __pyx_t_92, __pyx_pybuffernd_dtindex.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = Py_None;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = Py_None;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_4 = __pyx_f_6pandas_5tslib_convert_to_tsobject(__pyx_t_3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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 = 2542; __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":2543
 *                 pandas_datetime_to_datetimestruct(dtindex[i], PANDAS_FR_ns, &dts)
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)             # <<<<<<<<<<<<<<
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 */
        __pyx_v_isleap = is_leapyear(__pyx_v_dts.year);

        /* "pandas/tslib.pyx":2544
 *                 ts = convert_to_tsobject(dtindex[i], None, None)
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]             # <<<<<<<<<<<<<<
 *                 dom = dts.day
 *                 doy = mo_off + dom
 */
        __pyx_t_86 = __pyx_v_isleap;
        __pyx_t_93 = (__pyx_v_dts.month - 1);
        __pyx_t_19 = -1;
        if (__pyx_t_86 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_86 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_93 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_93 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2544; __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_86, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_93, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2545
 *                 isleap = is_leapyear(dts.year)
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day             # <<<<<<<<<<<<<<
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]
 */
        __pyx_t_94 = __pyx_v_dts.day;
        __pyx_v_dom = __pyx_t_94;

        /* "pandas/tslib.pyx":2546
 *                 mo_off = _month_offset[isleap, dts.month - 1]
 *                 dom = dts.day
 *                 doy = mo_off + dom             # <<<<<<<<<<<<<<
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 */
        __pyx_v_doy = (__pyx_v_mo_off + __pyx_v_dom);

        /* "pandas/tslib.pyx":2547
 *                 dom = dts.day
 *                 doy = mo_off + dom
 *                 ldom = _month_offset[isleap, dts.month]             # <<<<<<<<<<<<<<
 * 
 *                 if (dts.month == end_month) and (ldom == doy):
 */
        __pyx_t_47 = __pyx_v_isleap;
        __pyx_t_94 = __pyx_v_dts.month;
        __pyx_t_19 = -1;
        if (__pyx_t_47 < 0) {
          __pyx_t_19 = 0;
        } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd__month_offset.diminfo[0].shape)) __pyx_t_19 = 0;
        if (__pyx_t_94 < 0) {
          __pyx_t_19 = 1;
        } else if (unlikely(__pyx_t_94 >= __pyx_pybuffernd__month_offset.diminfo[1].shape)) __pyx_t_19 = 1;
        if (unlikely(__pyx_t_19 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_19);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_ldom = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd__month_offset.rcbuffer->pybuffer.buf, __pyx_t_47, __pyx_pybuffernd__month_offset.diminfo[0].strides, __pyx_t_94, __pyx_pybuffernd__month_offset.diminfo[1].strides));

        /* "pandas/tslib.pyx":2549
 *                 ldom = _month_offset[isleap, dts.month]
 * 
 *                 if (dts.month == end_month) and (ldom == doy):             # <<<<<<<<<<<<<<
 *                     out[i] = 1
 *             return out.view(bool)
 */
        __pyx_t_75 = (__pyx_v_dts.month == __pyx_v_end_month);
        if (__pyx_t_75) {
          __pyx_t_87 = (__pyx_v_ldom == __pyx_v_doy);
          __pyx_t_61 = __pyx_t_87;
        } else {
          __pyx_t_61 = __pyx_t_75;
        }
        if (__pyx_t_61) {

          /* "pandas/tslib.pyx":2550
 * 
 *                 if (dts.month == end_month) and (ldom == doy):
 *                     out[i] = 1             # <<<<<<<<<<<<<<
 *             return out.view(bool)
 * 
 */
          __pyx_t_95 = __pyx_v_i;
          __pyx_t_19 = -1;
          if (__pyx_t_95 < 0) {
            __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_95 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_19 = 0;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_95, __pyx_pybuffernd_out.diminfo[0].strides) = 1;
          goto __pyx_L60;
        }
        __pyx_L60:;
        __pyx_L57_continue:;
      }

      /* "pandas/tslib.pyx":2551
 *                 if (dts.month == end_month) and (ldom == doy):
 *                     out[i] = 1
 *             return out.view(bool)             # <<<<<<<<<<<<<<
 * 
 *     raise ValueError("Field %s not supported" % field)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __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 = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject*)&PyBool_Type));
      PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject*)&PyBool_Type));
      __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
      __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 = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }
    __pyx_L52:;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "pandas/tslib.pyx":2553
 *             return out.view(bool)
 * 
 *     raise ValueError("Field %s not supported" % field)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_129), __pyx_v_field); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __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 = 2553; __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 = 2553; __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 = 2553; __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_start_end_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":2556
 * 
 * 
 * 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":2557
 * 
 * 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 = 2557; __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 = 2557; __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":2558
 * 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 = 2558; __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_69date_normalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_69date_normalize = {__Pyx_NAMESTR("date_normalize"), (PyCFunction)__pyx_pw_6pandas_5tslib_69date_normalize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_69date_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":2563
 * 
 * 
 * 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 = 2563; __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 = 2563; __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 = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_68date_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_68date_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 = 2563; __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":2565
 * 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 = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2568
 *         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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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 = 2568; __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":2570
 *         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":2571
 * 
 *     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 = 2571; __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":2572
 *     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 = 2572; __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 = 2572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":2573
 *         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 = 2573; __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 = 2573; __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 = 2573; __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 = 2573; __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":2574
 *         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 = 2574; __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 = 2574; __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 = 2574; __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":2576
 *         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":2577
 *     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 = 2577; __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":2578
 *         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 = 2578; __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":2579
 *             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":2580
 *                 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 = 2580; __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":2581
 *                 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 = 2581; __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":2583
 *             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":2585
 *     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 = 2585; __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":2587
 * 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 = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2588
 *     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 = 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_n); 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));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2588; __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 = 2588; __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 = 2588; __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 = 2588; __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 = 2588; __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":2592
 *         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":2593
 * 
 *     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":2594
 *     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 = 2594; __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":2595
 *         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 = 2595; __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":2596
 *             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":2597
 *                 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 = 2597; __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":2598
 *                 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 = 2598; __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":2599
 *             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 = 2599; __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 = 2599; __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 = 2599; __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 = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {

    /* "pandas/tslib.pyx":2600
 *             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":2601
 *     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 = 2601; __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":2602
 *         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 = 2602; __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":2603
 *             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":2604
 *                 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 = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "pandas/tslib.pyx":2605
 *                 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":2606
 *             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 = 2606; __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 = 2606; __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 = 2606; __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 = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":2607
 *                                               &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 = 2607; __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 = 2607; __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 = 2607; __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 = 2606; __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 = 2606; __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":2608
 *             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 = 2608; __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 = 2608; __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 = 2608; __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 = 2608; __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 = 2608; __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":2609
 *                           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 = 2609; __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 = 2609; __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 = 2609; __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 = 2609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

      /* "pandas/tslib.pyx":2610
 *             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":2611
 *             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 = 2611; __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":2614
 *     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 = 2614; __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 = 2614; __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 = 2614; __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 = 2614; __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 = 2614; __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":2615
 *         # 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 = 2615; __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 = 2615; __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 = 2615; __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 = 2615; __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 = 2615; __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":2616
 *         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 = 2616; __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 = 2616; __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 = 2616; __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 = 2616; __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 = 2616; __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 = 2616; __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":2617
 *         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 = 2617; __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 = 2617; __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 = 2617; __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 = 2617; __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 = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "pandas/tslib.pyx":2618
 *         _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 = 2618; __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 = 2618; __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 = 2618; __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 = 2618; __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 = 2618; __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":2619
 *         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 = 2619; __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 = 2619; __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":2622
 * 
 *         # 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 = 2622; __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":2623
 *         # 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":2624
 *         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 = 2624; __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":2625
 *             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 = 2625; __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":2626
 *                 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":2627
 *                     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 = 2627; __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 = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2628
 *                     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":2629
 *                 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 = 2629; __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":2631
 *                 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":2632
 *         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 = 2632; __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":2633
 *             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 = 2633; __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":2634
 *                 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":2635
 *                     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 = 2635; __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 = 2635; __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 = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2636
 *                     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":2637
 *                 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 = 2637; __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":2639
 *                 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":2641
 *     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":2642
 * 
 * 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":2643
 * 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":2644
 *     dts.hour = 0
 *     dts.min = 0
 *     dts.sec = 0             # <<<<<<<<<<<<<<
 *     dts.us = 0
 *     dts.ps = 0
 */
  __pyx_v_dts->sec = 0;

  /* "pandas/tslib.pyx":2645
 *     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":2646
 *     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":2647
 *     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":2650
 * 
 * 
 * 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":2651
 * 
 * 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":2652
 * 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":2654
 *     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":2655
 * 
 *     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_71dates_normalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_71dates_normalized = {__Pyx_NAMESTR("dates_normalized"), (PyCFunction)__pyx_pw_6pandas_5tslib_71dates_normalized, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_71dates_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":2658
 * 
 * 
 * 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 = 2658; __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 = 2658; __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 = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_70dates_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_70dates_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 = 2658; __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":2660
 * 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 = 2660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2663
 *         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":2664
 * 
 *     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":2665
 *     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 = 2665; __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":2666
 *         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":2667
 *             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 = 2667; __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":2668
 *             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 = 2668; __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 = 2668; __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 = 2668; __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 = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":2669
 *                 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":2670
 *     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 = 2670; __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":2671
 *         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":2672
 *             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 = 2672; __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":2673
 *             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 = 2673; __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 = 2673; __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 = 2673; __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 = 2673; __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 = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);

      /* "pandas/tslib.pyx":2674
 *                 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 = 2674; __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 = 2674; __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 = 2673; __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 = 2673; __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":2675
 *             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 = 2675; __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 = 2675; __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 = 2675; __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 = 2675; __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":2676
 *                           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 = 2676; __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 = 2676; __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 = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (__pyx_t_4) {

        /* "pandas/tslib.pyx":2677
 *             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 = 2677; __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":2679
 *                 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 = 2679; __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 = 2679; __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 = 2679; __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":2680
 *     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 = 2680; __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 = 2680; __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 = 2680; __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":2681
 *         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":2683
 *         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 = 2683; __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 = 2683; __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 = 2683; __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 = 2683; __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 = 2683; __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 = 2683; __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":2684
 *             # 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 = 2684; __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 = 2684; __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":2686
 *             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 = 2686; __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 = 2686; __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 = 2686; __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 = 2686; __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 = 2686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "pandas/tslib.pyx":2687
 * 
 *             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":2688
 *             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":2689
 *                                               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 = 2689; __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":2691
 *                 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 = 2691; __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_73isleapyear(PyObject *__pyx_self, PyObject *__pyx_arg_year); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_73isleapyear = {__Pyx_NAMESTR("isleapyear"), (PyCFunction)__pyx_pw_6pandas_5tslib_73isleapyear, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_73isleapyear(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 = 2696; __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_72isleapyear(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_year));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2696
 * #----------------------------------------------------------------------
 * 
 * def isleapyear(int64_t year):             # <<<<<<<<<<<<<<
 *     return is_leapyear(year)
 * 
 */

static PyObject *__pyx_pf_6pandas_5tslib_72isleapyear(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":2697
 * 
 * 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 = 2697; __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_75monthrange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_75monthrange = {__Pyx_NAMESTR("monthrange"), (PyCFunction)__pyx_pw_6pandas_5tslib_75monthrange, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_75monthrange(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 = 2699; __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 = 2699; __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 = 2699; __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 = 2699; __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 = 2699; __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_74monthrange(__pyx_self, __pyx_v_year, __pyx_v_month);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2699
 *     return is_leapyear(year)
 * 
 * def monthrange(int64_t year, int64_t month):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t days
 */

static PyObject *__pyx_pf_6pandas_5tslib_74monthrange(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":2704
 *         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":2705
 * 
 *     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_132), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __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 = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2707
 *         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":2709
 *     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 = 2709; __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 = 2709; __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 = 2709; __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":2711
 *     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":2712
 * 
 * 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":2715
 * 
 * 
 * cpdef normalize_date(object dt):             # <<<<<<<<<<<<<<
 *     '''
 *     Normalize datetime.datetime value to midnight. Returns datetime.date as a
 */

static PyObject *__pyx_pw_6pandas_5tslib_77normalize_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":2724
 *     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":2725
 *     '''
 *     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 = 2725; __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 = 2725; __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 = 2725; __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 = 2725; __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 = 2725; __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 = 2725; __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 = 2725; __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":2726
 *     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":2727
 *         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 = 2727; __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 = 2727; __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 = 2727; __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 = 2727; __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 = 2727; __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":2729
 *         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_133), ((PyObject *)Py_TYPE(__pyx_v_dt))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2729; __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 = 2729; __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 = 2729; __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 = 2729; __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_77normalize_date(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static char __pyx_doc_6pandas_5tslib_76normalize_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_77normalize_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_76normalize_date(__pyx_self, ((PyObject *)__pyx_v_dt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2715
 * 
 * 
 * cpdef normalize_date(object dt):             # <<<<<<<<<<<<<<
 *     '''
 *     Normalize datetime.datetime value to midnight. Returns datetime.date as a
 */

static PyObject *__pyx_pf_6pandas_5tslib_76normalize_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 = 2715; __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":2731
 *         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 = 2731; __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":2734
 *                                                  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 = 2734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2735
 *     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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __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":2739
 *         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 = 2739; __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 = 2739; __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":2740
 * 
 *     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_134), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __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 = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2742
 *         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":2743
 * 
 *     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":2744
 *     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 = 2744; __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":2745
 *         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 = 2745; __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":2746
 *             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":2747
 *                 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 = 2747; __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":2749
 *             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 = 2748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/tslib.pyx":2748
 *                 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 = 2748; __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":2751
 *                                            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 = 2751; __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 = 2751; __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 = 2751; __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 = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "pandas/tslib.pyx":2752
 * 
 *     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":2753
 *     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 = 2753; __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":2754
 *         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 = 2754; __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":2755
 *             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":2756
 *                 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 = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "pandas/tslib.pyx":2757
 *                 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":2758
 *             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 = 2758; __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 = 2758; __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 = 2758; __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 = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":2759
 *                                               &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 = 2759; __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 = 2759; __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 = 2759; __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 = 2758; __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 = 2758; __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":2760
 *             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 = 2760; __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 = 2760; __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 = 2760; __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 = 2760; __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 = 2760; __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":2761
 *                           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 = 2761; __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 = 2761; __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 = 2761; __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 = 2761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

      /* "pandas/tslib.pyx":2762
 *             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":2764
 *                                               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 = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/tslib.pyx":2763
 *             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 = 2763; __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":2767
 *     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 = 2767; __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 = 2767; __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 = 2767; __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 = 2767; __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 = 2767; __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":2768
 *         # 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 = 2768; __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 = 2768; __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 = 2768; __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 = 2768; __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 = 2768; __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":2769
 *         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 = 2769; __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 = 2769; __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 = 2769; __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 = 2769; __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 = 2769; __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 = 2769; __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":2770
 *         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 = 2770; __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 = 2770; __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 = 2770; __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 = 2770; __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 = 2770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_9) {

      /* "pandas/tslib.pyx":2771
 *         _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 = 2771; __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 = 2771; __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 = 2771; __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 = 2771; __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 = 2771; __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":2772
 *         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 = 2772; __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 = 2772; __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":2775
 * 
 *         # 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 = 2775; __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":2776
 *         # 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":2777
 *         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 = 2777; __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":2778
 *             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 = 2778; __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":2779
 *                 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":2780
 *                     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 = 2780; __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 = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2781
 *                     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":2783
 *                                                   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 = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/tslib.pyx":2782
 *                 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 = 2782; __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":2785
 *                                                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":2786
 *         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 = 2786; __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":2787
 *             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 = 2787; __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":2788
 *                 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":2789
 *                     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 = 2789; __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 = 2789; __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 = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":2790
 *                     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":2792
 *                                                   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 = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/tslib.pyx":2791
 *                 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 = 2791; __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":2794
 *                                                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":2858
 * #----------------------------------------------------------------------
 * 
 * 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":2864
 *     integer).
 *     """
 *     if mult == 1:             # <<<<<<<<<<<<<<
 *         return period_ord
 * 
 */
  __pyx_t_1 = (__pyx_v_mult == 1);
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":2865
 *     """
 *     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":2867
 *         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 = 2867; __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 = 2867; __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":2869
 *     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":2873
 *     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":2874
 *     """
 *     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":2876
 *         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_79dt64arr_to_periodarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_78dt64arr_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_79dt64arr_to_periodarr = {__Pyx_NAMESTR("dt64arr_to_periodarr"), (PyCFunction)__pyx_pw_6pandas_5tslib_79dt64arr_to_periodarr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_78dt64arr_to_periodarr)};
static PyObject *__pyx_pw_6pandas_5tslib_79dt64arr_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":2878
 *     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 = 2878; __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 = 2878; __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 = 2878; __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 = 2878; __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 = 2878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_78dt64arr_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_78dt64arr_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 = 2878; __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":2888
 *         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 = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_l = __pyx_t_1;

  /* "pandas/tslib.pyx":2890
 *     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 = 2890; __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 = 2890; __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 = 2890; __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 = 2890; __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 = 2890; __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 = 2890; __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 = 2890; __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 = 2890; __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 = 2890; __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":2892
 *     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":2893
 * 
 *     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":2894
 *     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 = 2894; __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":2896
 *             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 = 2895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/tslib.pyx":2895
 *         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 = 2895; __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":2898
 *                                         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 = 2898; __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 = 2898; __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":2899
 *     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_81periodarr_to_dt64arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_80periodarr_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_81periodarr_to_dt64arr = {__Pyx_NAMESTR("periodarr_to_dt64arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_81periodarr_to_dt64arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_80periodarr_to_dt64arr)};
static PyObject *__pyx_pw_6pandas_5tslib_81periodarr_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 = 2901; __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 = 2901; __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 = 2901; __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 = 2901; __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 = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_80periodarr_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":2901
 *     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_80periodarr_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 = 2901; __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":2910
 *         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 = 2910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_l = __pyx_t_1;

  /* "pandas/tslib.pyx":2912
 *     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 = 2912; __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 = 2912; __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 = 2912; __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 = 2912; __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 = 2912; __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 = 2912; __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 = 2912; __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 = 2912; __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 = 2912; __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":2914
 *     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":2915
 * 
 *     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 = 2915; __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 = 2915; __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":2917
 *         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":2922
 * 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_83period_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":2931
 *         int64_t retval
 * 
 *     if end:             # <<<<<<<<<<<<<<
 *         retval = asfreq(period_ordinal, freq1, freq2, END)
 *     else:
 */
  if (__pyx_v_end) {

    /* "pandas/tslib.pyx":2932
 * 
 *     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 = 2932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_retval = __pyx_t_1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2934
 *         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 = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_retval = __pyx_t_1;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2936
 *         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":2937
 * 
 *     if retval == INT32_MIN:
 *         raise ValueError('Frequency conversion failed')             # <<<<<<<<<<<<<<
 * 
 *     return retval
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_136), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __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 = 2937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "pandas/tslib.pyx":2939
 *         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_83period_asfreq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_82period_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_83period_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 = 2922; __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 = 2922; __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 = 2922; __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 = 2922; __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 = 2922; __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 = 2922; __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 = 2922; __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 = 2923; __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 = 2922; __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_82period_asfreq(__pyx_self, __pyx_v_period_ordinal, __pyx_v_freq1, __pyx_v_freq2, __pyx_v_end);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2922
 * 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_82period_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 = 2922; __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_85period_asfreq_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_84period_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_85period_asfreq_arr = {__Pyx_NAMESTR("period_asfreq_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_85period_asfreq_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_84period_asfreq_arr)};
static PyObject *__pyx_pw_6pandas_5tslib_85period_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 = 2941; __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 = 2941; __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 = 2941; __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 = 2941; __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 = 2941; __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 = 2941; __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 = 2941; __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 = 2941; __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 = 2941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_84period_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":2941
 *     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_84period_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 = 2941; __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":2954
 *         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 = 2954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":2955
 * 
 *     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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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 = 2955; __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":2957
 *     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":2958
 * 
 *     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":2960
 *     get_asfreq_info(freq1, freq2, &finfo)
 * 
 *     if end:             # <<<<<<<<<<<<<<
 *         relation = END
 *     else:
 */
  if (__pyx_v_end) {

    /* "pandas/tslib.pyx":2961
 * 
 *     if end:
 *         relation = END             # <<<<<<<<<<<<<<
 *     else:
 *         relation = START
 */
    __pyx_v_relation = __pyx_v_6pandas_5tslib_END;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":2963
 *         relation = END
 *     else:
 *         relation = START             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
    __pyx_v_relation = __pyx_v_6pandas_5tslib_START;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":2965
 *         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":2966
 * 
 *     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 = 2966; __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":2967
 *     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":2968
 *         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_138), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __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 = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "pandas/tslib.pyx":2969
 *         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 = 2969; __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":2971
 *         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_87period_ordinal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_87period_ordinal = {__Pyx_NAMESTR("period_ordinal"), (PyCFunction)__pyx_pw_6pandas_5tslib_87period_ordinal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_87period_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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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 = 2973; __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_86period_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":2973
 *     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_86period_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":2977
 *         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 = 2977; __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 = 2977; __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":2980
 * 
 * 
 * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         pandas_datetimestruct dts
 */

static PyObject *__pyx_pw_6pandas_5tslib_89period_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":2986
 *         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 = 2986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2988
 *     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":2989
 * 
 *     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":2990
 *     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":2991
 *     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":2992
 *     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":2993
 *     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":2994
 *     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":2995
 *     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":2996
 *     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":2998
 *     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_89period_ordinal_to_dt64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_89period_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 = 2980; __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 = 2980; __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 = 2980; __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 = 2980; __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 = 2980; __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_88period_ordinal_to_dt64(__pyx_self, __pyx_v_ordinal, __pyx_v_freq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":2980
 * 
 * 
 * cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         pandas_datetimestruct dts
 */

static PyObject *__pyx_pf_6pandas_5tslib_88period_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 = 2980; __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_91period_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_91period_format = {__Pyx_NAMESTR("period_format"), (PyCFunction)__pyx_pw_6pandas_5tslib_91period_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_91period_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":3000
 *     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 = 3000; __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 = 3000; __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 = 3000; __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 = 3000; __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 = 3000; __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_90period_format(__pyx_self, __pyx_v_value, __pyx_v_freq, __pyx_v_fmt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_5tslib_90period_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":3004
 *         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":3005
 * 
 *     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":3030
 *         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":3006
 *     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":3007
 *         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_139));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_139);
      break;

      /* "pandas/tslib.pyx":3008
 *         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":3009
 *             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_140));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_140);
      break;

      /* "pandas/tslib.pyx":3010
 *         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":3011
 *             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_141));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_141);
      break;

      /* "pandas/tslib.pyx":3012
 *         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":3013
 *             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":3014
 *         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":3015
 *             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 = 3015; __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 = 3015; __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 = 3015; __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 = 3015; __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":3016
 *             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 = 3016; __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 = 3016; __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 = 3016; __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 = 3016; __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 = 3015; __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_142), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; __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":3017
 *             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":3018
 *                               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":3019
 *         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_143));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_143);
      break;

      /* "pandas/tslib.pyx":3020
 *               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":3021
 *             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_144));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_144);
      break;

      /* "pandas/tslib.pyx":3022
 *         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":3023
 *             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_145));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_145);
      break;

      /* "pandas/tslib.pyx":3024
 *         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":3025
 *             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_146));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_146);
      break;

      /* "pandas/tslib.pyx":3026
 *         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":3027
 *             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_147));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_147);
      break;

      /* "pandas/tslib.pyx":3028
 *         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":3029
 *             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_148));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_148);
      break;

      /* "pandas/tslib.pyx":3030
 *         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":3031
 *             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_149));
      __Pyx_DECREF(__pyx_v_fmt);
      __pyx_v_fmt = ((PyObject *)__pyx_kp_b_149);
      break;
      default:

      /* "pandas/tslib.pyx":3033
 *             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 = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_150), __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; __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 = 3033; __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 = 3033; __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 = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      break;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3035
 *             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 = 3035; __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":3047
 * 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":3048
 * 
 * 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 = 3048; __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":3055
 *         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 = 3055; __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 = 3055; __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 = 3055; __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 = 3055; __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":3058
 *         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":3059
 * 
 *     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 = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_152), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3059; __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":3061
 *         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 = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3062
 * 
 *     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 = 3062; __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 = 3062; __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":3063
 *     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 = 3063; __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 = 3063; __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 = 3063; __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":3064
 *     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 = 3064; __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 = 3064; __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 = 3064; __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":3065
 *         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 = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":3066
 *         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 = 3066; __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 = 3066; __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 = 3066; __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":3067
 *         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 = 3067; __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 = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "pandas/tslib.pyx":3069
 *             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 = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_formatted = c_strftime((&__pyx_v_dinfo), ((char *)__pyx_t_8));

  /* "pandas/tslib.pyx":3071
 *     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 = 3071; __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":3072
 * 
 *     result = util.char_to_string(formatted)
 *     free(formatted)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(len(extra_fmts)):
 */
  free(__pyx_v_formatted);

  /* "pandas/tslib.pyx":3074
 *     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 = 3074; __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 = 3074; __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":3075
 * 
 *     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 = 3075; __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 = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":3076
 *     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":3077
 *         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_154), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __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 = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "pandas/tslib.pyx":3089
 *             elif i == 4:
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:             # <<<<<<<<<<<<<<
 *                 repl = '%09d' % (value % 1000000000)
 * 
 */
      switch (__pyx_v_i) {

        /* "pandas/tslib.pyx":3079
 *                 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":3080
 * 
 *             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 = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_155), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __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":3081
 *             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":3082
 *                 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 = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_156), __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __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":3083
 *             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":3084
 *                 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 = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_155), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __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":3085
 *             elif i == 2:
 *                 repl = '%d' % year
 *             elif i == 3:             # <<<<<<<<<<<<<<
 *                 repl = '%03d' % (value % 1000)
 *             elif i == 4:
 */
        case 3:

        /* "pandas/tslib.pyx":3086
 *                 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 = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_157), __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __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":3087
 *             elif i == 3:
 *                 repl = '%03d' % (value % 1000)
 *             elif i == 4:             # <<<<<<<<<<<<<<
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:
 */
        case 4:

        /* "pandas/tslib.pyx":3088
 *                 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 = 3088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_158), __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3088; __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":3089
 *             elif i == 4:
 *                 repl = '%06d' % (value % 1000000)
 *             elif i == 5:             # <<<<<<<<<<<<<<
 *                 repl = '%09d' % (value % 1000000000)
 * 
 */
        case 5:

        /* "pandas/tslib.pyx":3090
 *                 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 = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_159), __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __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":3092
 *                 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 = 3092; __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 = 3092; __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 = 3092; __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 = 3092; __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 = 3092; __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 = 3092; __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":3094
 *             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":3095
 * 
 *     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 = 3095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __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 = 3095; __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":3097
 *        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_93get_period_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_93get_period_field = {__Pyx_NAMESTR("get_period_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_93get_period_field, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_93get_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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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_92get_period_field(__pyx_self, __pyx_v_code, __pyx_v_value, __pyx_v_freq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3103
 * 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_92get_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":3104
 * 
 * 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":3105
 * 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":3106
 *     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 = 3106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_161), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3106; __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 = 3106; __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 = 3106; __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 = 3106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3107
 *     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 = 3107; __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 = 3107; __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_95get_period_field_arr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_95get_period_field_arr = {__Pyx_NAMESTR("get_period_field_arr"), (PyCFunction)__pyx_pw_6pandas_5tslib_95get_period_field_arr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_95get_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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_94get_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":3109
 *     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_94get_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 = 3109; __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":3115
 *         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":3116
 * 
 *     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":3117
 *     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 = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_161), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __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 = 3117; __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 = 3117; __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 = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3119
 *         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 = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_sz = __pyx_t_4;

  /* "pandas/tslib.pyx":3120
 * 
 *     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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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":3122
 *     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":3123
 * 
 *     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 = 3123; __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 = 3123; __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 = 3123; __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":3125
 *         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":3129
 * 
 * 
 * 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":3150
 *     elif code == 9:
 *         return &pday_of_year
 *     elif code == 10:             # <<<<<<<<<<<<<<
 *         return &pweekday
 *     return NULL
 */
  switch (__pyx_v_code) {

    /* "pandas/tslib.pyx":3130
 * 
 * cdef accessor _get_accessor_func(int code):
 *     if code == 0:             # <<<<<<<<<<<<<<
 *         return &pyear
 *     elif code == 1:
 */
    case 0:

    /* "pandas/tslib.pyx":3131
 * 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":3132
 *     if code == 0:
 *         return &pyear
 *     elif code == 1:             # <<<<<<<<<<<<<<
 *         return &pqyear
 *     elif code == 2:
 */
    case 1:

    /* "pandas/tslib.pyx":3133
 *         return &pyear
 *     elif code == 1:
 *         return &pqyear             # <<<<<<<<<<<<<<
 *     elif code == 2:
 *         return &pquarter
 */
    __pyx_r = (&pqyear);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3134
 *     elif code == 1:
 *         return &pqyear
 *     elif code == 2:             # <<<<<<<<<<<<<<
 *         return &pquarter
 *     elif code == 3:
 */
    case 2:

    /* "pandas/tslib.pyx":3135
 *         return &pqyear
 *     elif code == 2:
 *         return &pquarter             # <<<<<<<<<<<<<<
 *     elif code == 3:
 *         return &pmonth
 */
    __pyx_r = (&pquarter);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3136
 *     elif code == 2:
 *         return &pquarter
 *     elif code == 3:             # <<<<<<<<<<<<<<
 *         return &pmonth
 *     elif code == 4:
 */
    case 3:

    /* "pandas/tslib.pyx":3137
 *         return &pquarter
 *     elif code == 3:
 *         return &pmonth             # <<<<<<<<<<<<<<
 *     elif code == 4:
 *         return &pday
 */
    __pyx_r = (&pmonth);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3138
 *     elif code == 3:
 *         return &pmonth
 *     elif code == 4:             # <<<<<<<<<<<<<<
 *         return &pday
 *     elif code == 5:
 */
    case 4:

    /* "pandas/tslib.pyx":3139
 *         return &pmonth
 *     elif code == 4:
 *         return &pday             # <<<<<<<<<<<<<<
 *     elif code == 5:
 *         return &phour
 */
    __pyx_r = (&pday);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3140
 *     elif code == 4:
 *         return &pday
 *     elif code == 5:             # <<<<<<<<<<<<<<
 *         return &phour
 *     elif code == 6:
 */
    case 5:

    /* "pandas/tslib.pyx":3141
 *         return &pday
 *     elif code == 5:
 *         return &phour             # <<<<<<<<<<<<<<
 *     elif code == 6:
 *         return &pminute
 */
    __pyx_r = (&phour);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3142
 *     elif code == 5:
 *         return &phour
 *     elif code == 6:             # <<<<<<<<<<<<<<
 *         return &pminute
 *     elif code == 7:
 */
    case 6:

    /* "pandas/tslib.pyx":3143
 *         return &phour
 *     elif code == 6:
 *         return &pminute             # <<<<<<<<<<<<<<
 *     elif code == 7:
 *         return &psecond
 */
    __pyx_r = (&pminute);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3144
 *     elif code == 6:
 *         return &pminute
 *     elif code == 7:             # <<<<<<<<<<<<<<
 *         return &psecond
 *     elif code == 8:
 */
    case 7:

    /* "pandas/tslib.pyx":3145
 *         return &pminute
 *     elif code == 7:
 *         return &psecond             # <<<<<<<<<<<<<<
 *     elif code == 8:
 *         return &pweek
 */
    __pyx_r = (&psecond);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3146
 *     elif code == 7:
 *         return &psecond
 *     elif code == 8:             # <<<<<<<<<<<<<<
 *         return &pweek
 *     elif code == 9:
 */
    case 8:

    /* "pandas/tslib.pyx":3147
 *         return &psecond
 *     elif code == 8:
 *         return &pweek             # <<<<<<<<<<<<<<
 *     elif code == 9:
 *         return &pday_of_year
 */
    __pyx_r = (&pweek);
    goto __pyx_L0;
    break;

    /* "pandas/tslib.pyx":3148
 *     elif code == 8:
 *         return &pweek
 *     elif code == 9:             # <<<<<<<<<<<<<<
 *         return &pday_of_year
 *     elif code == 10:
 */
    case 9:

    /* "pandas/tslib.pyx":3149
 *         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":3150
 *     elif code == 9:
 *         return &pday_of_year
 *     elif code == 10:             # <<<<<<<<<<<<<<
 *         return &pweekday
 *     return NULL
 */
    case 10:

    /* "pandas/tslib.pyx":3151
 *         return &pday_of_year
 *     elif code == 10:
 *         return &pweekday             # <<<<<<<<<<<<<<
 *     return NULL
 * 
 */
    __pyx_r = (&pweekday);
    goto __pyx_L0;
    break;
  }

  /* "pandas/tslib.pyx":3152
 *     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_97extract_ordinals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_97extract_ordinals = {__Pyx_NAMESTR("extract_ordinals"), (PyCFunction)__pyx_pw_6pandas_5tslib_97extract_ordinals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_97extract_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 = 3155; __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 = 3155; __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 = 3155; __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 = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_96extract_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":3155
 * 
 * 
 * def extract_ordinals(ndarray[object] values, freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

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

  /* "pandas/tslib.pyx":3158
 *     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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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":3161
 *         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":3162
 * 
 *     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 = 3162; __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":3163
 *     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 = 3163; __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 = 3163; __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 = 3163; __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":3164
 *         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 = 3164; __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 = 3164; __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 = 3164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_13) {

      /* "pandas/tslib.pyx":3165
 *         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_162), __pyx_v_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __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 = 3165; __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 = 3165; __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 = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/tslib.pyx":3167
 *             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":3169
 *     return ordinals
 * 
 * cpdef resolution(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */

static PyObject *__pyx_pw_6pandas_5tslib_99resolution(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 = 3169; __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":3171
 * 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 = 3171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":3173
 *         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 = 3173; __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 = 3173; __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":3175
 *         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":3176
 * 
 *     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 = 3176; __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 = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":3177
 *     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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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":3178
 *         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 = 3178; __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":3180
 *         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":3181
 *     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 = 3181; __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":3182
 *         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":3183
 *             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 = 3183; __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":3184
 *                 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":3185
 *             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":3186
 *             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":3187
 *             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 = 3187; __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_99resolution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_5tslib_99resolution(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":3169
 *     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 = 3169; __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 = 3169; __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 = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_5tslib_98resolution(__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_98resolution(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 = 3169; __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 = 3169; __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":3195
 * 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":3196
 * 
 * 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":3197
 * 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 = 3197; __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 = 3197; __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":3198
 *     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":3199
 *         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 = 3199; __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 = 3199; __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":3200
 *     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":3201
 *         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 = 3201; __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 = 3201; __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":3202
 *     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":3203
 *         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 = 3203; __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 = 3203; __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":3204
 *     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 = 3204; __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 = 3204; __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":3206
 *     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 = 3206; __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":3208
 * 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 = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/tslib.pyx":3209
 *     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 = 3209; __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 = 3209; __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":3213
 *         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":3214
 * 
 *     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":3215
 *     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 = 3215; __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":3216
 *         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":3217
 *             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 = 3217; __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":3218
 *                 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":3219
 *             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":3220
 *             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":3221
 *             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 = 3221; __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 = 3221; __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 = 3221; __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 = 3221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":3222
 *                 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":3223
 *     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 = 3223; __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":3224
 *         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":3225
 *             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 = 3225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "pandas/tslib.pyx":3226
 *                 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":3227
 *             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 = 3227; __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 = 3227; __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 = 3227; __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 = 3227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);

      /* "pandas/tslib.pyx":3228
 *                                               &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 = 3228; __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 = 3228; __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 = 3228; __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 = 3227; __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 = 3227; __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":3229
 *             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 = 3229; __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 = 3229; __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 = 3229; __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 = 3229; __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 = 3229; __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":3230
 *                           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 = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pandas/tslib.pyx":3231
 *             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":3232
 *             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":3233
 *                                               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":3234
 *             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":3237
 *     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 = 3237; __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 = 3237; __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 = 3237; __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 = 3237; __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 = 3237; __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":3238
 *         # 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 = 3238; __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 = 3238; __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 = 3238; __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 = 3238; __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 = 3238; __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":3239
 *         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 = 3239; __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 = 3239; __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 = 3239; __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 = 3239; __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 = 3239; __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 = 3239; __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":3240
 *         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 = 3240; __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 = 3240; __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 = 3240; __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 = 3240; __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 = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_4) {

      /* "pandas/tslib.pyx":3241
 *         _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 = 3241; __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 = 3241; __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 = 3241; __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 = 3241; __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 = 3241; __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":3242
 *         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 = 3242; __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 = 3242; __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":3245
 * 
 *         # 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 = 3245; __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":3246
 *         # 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":3247
 *         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 = 3247; __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":3248
 *             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":3249
 *                 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 = 3249; __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 = 3249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":3250
 *                     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":3251
 *                 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":3252
 *                                                   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":3253
 *                 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":3255
 *                     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":3256
 *         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 = 3256; __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":3257
 *             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":3258
 *                 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 = 3258; __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 = 3258; __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 = 3258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "pandas/tslib.pyx":3259
 *                     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":3260
 *                 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":3261
 *                                                   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":3262
 *                 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":3264
 *                     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 = 3264; __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_101_getlang(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_5tslib_101_getlang = {__Pyx_NAMESTR("_getlang"), (PyCFunction)__pyx_pw_6pandas_5tslib_101_getlang, METH_NOARGS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_5tslib_101_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_100_getlang(__pyx_self);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/tslib.pyx":3303
 * __all__ = []
 * 
 * def _getlang():             # <<<<<<<<<<<<<<
 *     # Figure out what the current language is set to.
 *     return locale.getlocale(locale.LC_TIME)
 */

static PyObject *__pyx_pf_6pandas_5tslib_100_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":3305
 * 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 = 3305; __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 = 3305; __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 = 3305; __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 = 3305; __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 = 3305; __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 = 3305; __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":3326
 *     """
 * 
 *     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":3346
 * 
 *         """
 *         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 = 3346; __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 = 3346; __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 = 3346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3347
 *         """
 *         self.lang = _getlang()
 *         self.__calc_weekday()             # <<<<<<<<<<<<<<
 *         self.__calc_month()
 *         self.__calc_am_pm()
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_163); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __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 = 3347; __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":3348
 *         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_164); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __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 = 3348; __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":3349
 *         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_165); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __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 = 3349; __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":3350
 *         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_166); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __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 = 3350; __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":3351
 *         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_167); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __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 = 3351; __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":3352
 *         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 = 3352; __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 = 3352; __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 = 3352; __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 = 3352; __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 = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "pandas/tslib.pyx":3353
 *         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_169), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __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 = 3353; __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 = 3355; __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 = 3355; __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 = 3355; __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 = 3355; __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":3355
 *             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":3357
 *     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 = 3357; __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 = 3357; __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":3358
 *         # 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 = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "pandas/tslib.pyx":3359
 *         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 = 3359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_170), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3359; __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":3361
 *             seq.insert(0, '')
 *         else:
 *             seq.append('')             # <<<<<<<<<<<<<<
 *         return seq
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_seq, ((PyObject *)__pyx_kp_s_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __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":3362
 *         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":3364
 *         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":3367
 *         # 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 = 3367; __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 = 3367; __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 = 3367; __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 = 3367; __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 = 3367; __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 = 3367; __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 = 3367; __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":3368
 *         # 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 = 3368; __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 = 3368; __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 = 3368; __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 = 3368; __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 = 3368; __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 = 3368; __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 = 3368; __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":3369
 *         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 = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3370
 *         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 = 3370; __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":3372
 *         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":3374
 *     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 = 3374; __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 = 3374; __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 = 3374; __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 = 3374; __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 = 3374; __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 = 3374; __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 = 3374; __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":3375
 *         # 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 = 3375; __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 = 3375; __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 = 3375; __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 = 3375; __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 = 3375; __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 = 3375; __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 = 3375; __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":3376
 *         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 = 3376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3377
 *         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 = 3377; __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":3379
 *         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":3385
 *         # 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 = 3385; __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":3386
 *         # 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_171); __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 = 3386; __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 = 3386; __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":3387
 *         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 = 3387; __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 = 3387; __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 = 3387; __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 = 3387; __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 = 3387; __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":3388
 *         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 = 3388; __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 = 3388; __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 = 3388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_172));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_172));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_172));
    __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 = 3388; __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 = 3388; __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 = 3388; __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 = 3388; __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":3389
 *             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 = 3389; __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":3391
 *         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":3399
 *         # 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 = 3399; __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 = 3399; __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_174), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3399; __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":3400
 *         # 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 = 3400; __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":3401
 *         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 = 3401; __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 = 3401; __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 = 3401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_175));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_175));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_175));
  __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 = 3401; __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 = 3401; __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 = 3401; __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 = 3401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3402
 *         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 = 3402; __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 = 3402; __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 = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_176));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_176));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_176));
  __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 = 3402; __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 = 3402; __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 = 3402; __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 = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3403
 *         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 = 3403; __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 = 3403; __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 = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_177));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_177));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_177));
  __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 = 3403; __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 = 3403; __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 = 3403; __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 = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3404
 *         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 = 3404; __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 = 3404; __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 = 3404; __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_180));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_180));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_180));
  __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":3405
 *         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 = 3405; __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 = 3405; __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 = 3405; __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_181));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_181));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_181));
  __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 = 3405; __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 = 3405; __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 = 3405; __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_182));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_182));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_182));
  __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":3406
 *         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 = 3406; __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 = 3406; __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 = 3406; __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_183));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_kp_s_183));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_183));
  __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 = 3406; __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 = 3406; __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 = 3406; __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_172));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_172));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_172));
  __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3411
 *                     ('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 = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_179));
  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_k_tuple_179));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179));
  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_184));
  PyList_SET_ITEM(__pyx_t_6, 6, ((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, 7, ((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, 8, ((PyObject *)__pyx_k_tuple_188));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_190));
  PyList_SET_ITEM(__pyx_t_6, 9, ((PyObject *)__pyx_k_tuple_190));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_192));
  PyList_SET_ITEM(__pyx_t_6, 10, ((PyObject *)__pyx_k_tuple_192));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_194));
  PyList_SET_ITEM(__pyx_t_6, 11, ((PyObject *)__pyx_k_tuple_194));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_195));
  PyList_SET_ITEM(__pyx_t_6, 12, ((PyObject *)__pyx_k_tuple_195));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_197));
  PyList_SET_ITEM(__pyx_t_6, 13, ((PyObject *)__pyx_k_tuple_197));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_197));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_198));
  PyList_SET_ITEM(__pyx_t_6, 14, ((PyObject *)__pyx_k_tuple_198));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_200));
  PyList_SET_ITEM(__pyx_t_6, 15, ((PyObject *)__pyx_k_tuple_200));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_200));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_202));
  PyList_SET_ITEM(__pyx_t_6, 16, ((PyObject *)__pyx_k_tuple_202));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202));
  __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":3412
 *                     # '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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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":3413
 *                     ('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 = 3413; __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 = 3413; __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 = 3413; __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 = 3413; __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 = 3413; __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 = 3413; __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":3412
 *                     # '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 = 3412; __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_203));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_203));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_203));
      if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3412; __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 = 3412; __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 = 3412; __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":3414
 *         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_207); __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 = 3414; __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 = 3414; __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 = 3414; __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 = 3414; __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 = 3414; __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 = 3414; __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 = 3414; __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 = 3414; __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":3415
 *                                                 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 = 3415; __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":3416
 *         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 = 3416; __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 = 3416; __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 = 3416; __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 = 3416; __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 = 3416; __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 = 3416; __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 = 3416; __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 = 3416; __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":3421
 *                 # 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 = 3421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_12) {

        /* "pandas/tslib.pyx":3422
 *                 # 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 = 3422; __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 = 3422; __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 = 3422; __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":3426
 *             # 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 = 3426; __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 = 3426; __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_209), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3426; __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":3427
 *             # %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 = 3427; __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 = 3427; __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 = 3427; __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 = 3427; __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 = 3427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_12) {

      /* "pandas/tslib.pyx":3428
 *             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_210));
      __Pyx_XDECREF(__pyx_v_U_W);
      __pyx_v_U_W = ((PyObject *)__pyx_kp_s_210);
      goto __pyx_L16;
    }
    /*else*/ {

      /* "pandas/tslib.pyx":3430
 *                 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_211));
      __Pyx_XDECREF(__pyx_v_U_W);
      __pyx_v_U_W = ((PyObject *)__pyx_kp_s_211);
    }
    __pyx_L16:;

    /* "pandas/tslib.pyx":3431
 *             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 = 3431; __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 = 3431; __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 = 3431; __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 = 3431; __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":3432
 *                 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 = 3432; __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 = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3433
 *             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 = 3433; __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 = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3434
 *         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 = 3434; __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 = 3434; __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":3436
 *         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":3440
 *         # 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":3441
 *         # 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 = 3441; __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 = 3441; __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 = 3441; __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":3442
 *         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":3444
 *         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 = 3444; __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 = 3444; __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 = 3444; __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 = 3444; __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 = 3444; __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 = 3444; __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 = 3444; __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 = 3444; __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":3445
 *             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 = 3445; __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 = 3445; __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 = 3445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_7) {

    /* "pandas/tslib.pyx":3446
 *         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 = 3446; __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 = 3446; __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 = 3446; __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 = 3446; __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 = 3446; __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 = 3446; __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 = 3446; __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 = 3446; __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":3448
 *             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 = 3448; __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":3449
 *         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 = 3449; __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 = 3449; __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":3455
 *     """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 = 3455; __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 = 3455; __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":3488
 *             '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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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":3489
 *             '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 = 3489; __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 = 3489; __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 = 3489; __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 = 3489; __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 = 3489; __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 = 3489; __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":3488
 *             '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 = 3488; __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":3455
 *     """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":3461
 * 
 *         """
 *         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 = 3461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "pandas/tslib.pyx":3462
 *         """
 *         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 = 3462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3464
 *             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 = 3464; __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 = 3464; __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 = 3464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "pandas/tslib.pyx":3465
 *         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 = 3465; __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 = 3465; __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 = 3465; __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":3466
 *             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 = 3466; __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 = 3466; __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_212)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_kp_s_213)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__H), ((PyObject *)__pyx_kp_s_214)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__I), ((PyObject *)__pyx_kp_s_215)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_kp_s_216)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__m), ((PyObject *)__pyx_kp_s_217)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__M), ((PyObject *)__pyx_kp_s_218)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__S), ((PyObject *)__pyx_kp_s_219)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__U), ((PyObject *)__pyx_kp_s_220)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__w), ((PyObject *)__pyx_kp_s_221)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__y), ((PyObject *)__pyx_kp_s_222)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__Y), ((PyObject *)__pyx_kp_s_223)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3483
 *             #     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 = 3483; __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 = 3483; __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 = 3483; __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 = 3483; __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 = 3483; __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 = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3484
 *             '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 = 3484; __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 = 3484; __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 = 3484; __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 = 3484; __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 = 3484; __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 = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/tslib.pyx":3485
 *             '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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3486
 *             '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 = 3486; __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 = 3486; __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 = 3486; __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 = 3486; __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 = 3486; __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 = 3486; __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 = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pandas/tslib.pyx":3487
 *             '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 = 3487; __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 = 3487; __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 = 3487; __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 = 3487; __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 = 3487; __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 = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/tslib.pyx":3488
 *             '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 = 3488; __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 = 3488; __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 = 3488; __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 = 3488; __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 = 3466; __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_97), ((PyObject *)__pyx_kp_s_97)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __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 = 3466; __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 = 3466; __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":3492
 *                                 '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 = 3492; __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 = 3492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_224), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __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 = 3492; __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_225), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __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 = 3492; __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 = 3492; __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":3493
 *             '%': '%'})
 *         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 = 3493; __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 = 3493; __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 = 3493; __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 = 3493; __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 = 3493; __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 = 3493; __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 = 3493; __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 = 3493; __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":3494
 *         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 = 3494; __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 = 3494; __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 = 3494; __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 = 3494; __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 = 3494; __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 = 3494; __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 = 3494; __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 = 3494; __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":3495
 *         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 = 3495; __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 = 3495; __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 = 3495; __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 = 3495; __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 = 3495; __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 = 3495; __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 = 3495; __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 = 3495; __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 = 3497; __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 = 3497; __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 = 3497; __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 = 3497; __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":3512
 *         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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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":3497
 *         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":3506
 * 
 *         """
 *         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 = 3506; __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 = 3506; __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 = 3506; __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 = 3506; __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 = 3506; __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 = 3506; __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 = 3506; __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":3507
 *         """
 *         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 = 3507; __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 = 3507; __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 = 3507; __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 = 3507; __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 = 3507; __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 = 3507; __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":3508
 *         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_9), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3508; __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 = 3508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_6) {

      /* "pandas/tslib.pyx":3509
 *         for value in to_convert:
 *             if value != '':
 *                 break             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  /*else*/ {

    /* "pandas/tslib.pyx":3511
 *                 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_9));
    __pyx_r = ((PyObject *)__pyx_kp_s_9);
    __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":3512
 *         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_226), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __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 = 3512; __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 = 3512; __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 = 3512; __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":3513
 *             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 = 3513; __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_227), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __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":3514
 *         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_228), __pyx_v_regex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3514; __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 = 3516; __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 = 3516; __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 = 3516; __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":3516
 *         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":3523
 * 
 *         """
 *         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_9));
  __pyx_v_processed_format = ((PyObject *)__pyx_kp_s_9);

  /* "pandas/tslib.pyx":3527
 *         # 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 = 3527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_230), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3527; __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":3528
 *         # 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 = 3528; __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 = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_231));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_231));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_231));
  __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 = 3528; __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":3529
 *         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 = 3529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_233), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3529; __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":3530
 *         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 = 3530; __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 = 3530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_232));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_232));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_232));
  __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 = 3530; __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":3531
 *         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_97), __pyx_v_format, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_4) break;

    /* "pandas/tslib.pyx":3532
 *         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 = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_234), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3532; __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 = 3532; __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":3534
 *             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 = 3534; __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 = 3534; __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 = 3534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);

    /* "pandas/tslib.pyx":3535
 *             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 = 3535; __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 = 3535; __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 = 3533; __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_235), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __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":3536
 *                                            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 = 3536; __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 = 3536; __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 = 3536; __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":3537
 *                                            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 = 3537; __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_236), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3537; __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 = 3539; __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 = 3539; __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 = 3539; __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":3539
 *         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":3541
 *     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 = 3541; __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 = 3541; __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 = 3541; __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 = 3541; __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 = 3541; __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 = 3541; __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 = 3541; __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_103_calc_julian_from_U_or_W(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_5tslib_102_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_103_calc_julian_from_U_or_W = {__Pyx_NAMESTR("_calc_julian_from_U_or_W"), (PyCFunction)__pyx_pw_6pandas_5tslib_103_calc_julian_from_U_or_W, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_102_calc_julian_from_U_or_W)};
static PyObject *__pyx_pw_6pandas_5tslib_103_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 = 3550; __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 = 3550; __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 = 3550; __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 = 3550; __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 = 3550; __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_102_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":3550
 * _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_102_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":3554
 *     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 = 3554; __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 = 3554; __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 = 3554; __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 = 3554; __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 = 3554; __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":3558
 *     # 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 = 3558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":3559
 *     # 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 = 3559; __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 = 3559; __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":3560
 *     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 = 3560; __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 = 3560; __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":3563
 *     # 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 = 3563; __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 = 3563; __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":3564
 *     # 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 = 3564; __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 = 3564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "pandas/tslib.pyx":3565
 *     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 = 3565; __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 = 3565; __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":3567
 *         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 = 3567; __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 = 3567; __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 = 3567; __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":3568
 *     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 = 3568; __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 = 3568; __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_237), __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_239), 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_241), 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_243), 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_244), __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_246), 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_247), 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_249), 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_244), __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":970
 * 
 * 
 * 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":972
 * 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":973
 *      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":975
 *          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":976
 *      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":977
 *          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":978
 *          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":980
 *      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":981
 * 
 * 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":982
 * 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":984
 *         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_250), 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_251), 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)},
  {__Pyx_NAMESTR("_get_start_end_field"), (PyCFunction)__pyx_pw_6pandas_5tslib_10_Timestamp_13_get_start_end_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 = {
  __pyx_pw_6pandas_5tslib_4_NaT_5__add__, /*nb_add*/
  __pyx_pw_6pandas_5tslib_4_NaT_7__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__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_11get_value_box, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_utcoffset"), (PyCFunction)__pyx_pw_6pandas_5tslib_19_get_utcoffset, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("cast_from_unit"), (PyCFunction)__pyx_pw_6pandas_5tslib_39cast_from_unit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_38cast_from_unit)},
  {__Pyx_NAMESTR("_unbox_utcoffsets"), (PyCFunction)__pyx_pw_6pandas_5tslib_57_unbox_utcoffsets, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("normalize_date"), (PyCFunction)__pyx_pw_6pandas_5tslib_77normalize_date, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_76normalize_date)},
  {__Pyx_NAMESTR("period_asfreq"), (PyCFunction)__pyx_pw_6pandas_5tslib_83period_asfreq, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_5tslib_82period_asfreq)},
  {__Pyx_NAMESTR("period_ordinal_to_dt64"), (PyCFunction)__pyx_pw_6pandas_5tslib_89period_ordinal_to_dt64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("resolution"), (PyCFunction)__pyx_pw_6pandas_5tslib_99resolution, 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_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
  {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0},
  {&__pyx_n_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 1},
  {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
  {&__pyx_kp_s_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 1, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_n_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 1},
  {&__pyx_kp_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 0},
  {&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 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_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 0},
  {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1},
  {&__pyx_kp_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0},
  {&__pyx_kp_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 0},
  {&__pyx_kp_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 0},
  {&__pyx_kp_s_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 1, 0},
  {&__pyx_kp_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 0},
  {&__pyx_kp_b_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 0, 0},
  {&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
  {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
  {&__pyx_kp_b_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 0, 0},
  {&__pyx_kp_b_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 0, 0},
  {&__pyx_kp_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 0},
  {&__pyx_kp_b_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 0, 0},
  {&__pyx_kp_b_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 0, 0},
  {&__pyx_kp_b_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 0, 0},
  {&__pyx_kp_b_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 0, 0},
  {&__pyx_kp_b_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 0, 0},
  {&__pyx_kp_b_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 0, 0},
  {&__pyx_kp_b_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 0, 0},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_kp_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 0},
  {&__pyx_kp_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 0},
  {&__pyx_kp_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 0},
  {&__pyx_kp_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 0},
  {&__pyx_kp_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0},
  {&__pyx_kp_s_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 1, 0},
  {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
  {&__pyx_kp_s_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 0},
  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 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_n_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 1},
  {&__pyx_n_s_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 1, 1},
  {&__pyx_n_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 1},
  {&__pyx_n_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 1},
  {&__pyx_n_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 1},
  {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0},
  {&__pyx_n_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 1},
  {&__pyx_kp_s_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 0, 1, 0},
  {&__pyx_kp_s_175, __pyx_k_175, sizeof(__pyx_k_175), 0, 0, 1, 0},
  {&__pyx_kp_s_176, __pyx_k_176, sizeof(__pyx_k_176), 0, 0, 1, 0},
  {&__pyx_kp_s_177, __pyx_k_177, sizeof(__pyx_k_177), 0, 0, 1, 0},
  {&__pyx_kp_s_178, __pyx_k_178, sizeof(__pyx_k_178), 0, 0, 1, 0},
  {&__pyx_kp_s_180, __pyx_k_180, sizeof(__pyx_k_180), 0, 0, 1, 0},
  {&__pyx_kp_s_181, __pyx_k_181, sizeof(__pyx_k_181), 0, 0, 1, 0},
  {&__pyx_kp_s_182, __pyx_k_182, sizeof(__pyx_k_182), 0, 0, 1, 0},
  {&__pyx_kp_s_183, __pyx_k_183, sizeof(__pyx_k_183), 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_191, __pyx_k_191, sizeof(__pyx_k_191), 0, 0, 1, 0},
  {&__pyx_kp_s_193, __pyx_k_193, sizeof(__pyx_k_193), 0, 0, 1, 0},
  {&__pyx_kp_s_196, __pyx_k_196, sizeof(__pyx_k_196), 0, 0, 1, 0},
  {&__pyx_kp_s_199, __pyx_k_199, sizeof(__pyx_k_199), 0, 0, 1, 0},
  {&__pyx_n_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 1},
  {&__pyx_kp_s_201, __pyx_k_201, sizeof(__pyx_k_201), 0, 0, 1, 0},
  {&__pyx_kp_s_203, __pyx_k_203, sizeof(__pyx_k_203), 0, 0, 1, 0},
  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
  {&__pyx_kp_s_210, __pyx_k_210, sizeof(__pyx_k_210), 0, 0, 1, 0},
  {&__pyx_kp_s_211, __pyx_k_211, sizeof(__pyx_k_211), 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_216, __pyx_k_216, sizeof(__pyx_k_216), 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_219, __pyx_k_219, sizeof(__pyx_k_219), 0, 0, 1, 0},
  {&__pyx_kp_s_220, __pyx_k_220, sizeof(__pyx_k_220), 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_s_226, __pyx_k_226, sizeof(__pyx_k_226), 0, 0, 1, 0},
  {&__pyx_kp_s_227, __pyx_k_227, sizeof(__pyx_k_227), 0, 0, 1, 0},
  {&__pyx_kp_s_228, __pyx_k_228, sizeof(__pyx_k_228), 0, 0, 1, 0},
  {&__pyx_kp_s_229, __pyx_k_229, sizeof(__pyx_k_229), 0, 0, 1, 0},
  {&__pyx_n_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 1},
  {&__pyx_kp_s_231, __pyx_k_231, sizeof(__pyx_k_231), 0, 0, 1, 0},
  {&__pyx_kp_s_232, __pyx_k_232, sizeof(__pyx_k_232), 0, 0, 1, 0},
  {&__pyx_kp_s_235, __pyx_k_235, sizeof(__pyx_k_235), 0, 0, 1, 0},
  {&__pyx_kp_s_236, __pyx_k_236, sizeof(__pyx_k_236), 0, 0, 1, 0},
  {&__pyx_kp_s_237, __pyx_k_237, sizeof(__pyx_k_237), 0, 0, 1, 0},
  {&__pyx_kp_u_238, __pyx_k_238, sizeof(__pyx_k_238), 0, 1, 0, 0},
  {&__pyx_kp_u_240, __pyx_k_240, sizeof(__pyx_k_240), 0, 1, 0, 0},
  {&__pyx_kp_u_242, __pyx_k_242, sizeof(__pyx_k_242), 0, 1, 0, 0},
  {&__pyx_kp_u_244, __pyx_k_244, sizeof(__pyx_k_244), 0, 1, 0, 0},
  {&__pyx_kp_u_245, __pyx_k_245, sizeof(__pyx_k_245), 0, 1, 0, 0},
  {&__pyx_kp_u_248, __pyx_k_248, sizeof(__pyx_k_248), 0, 1, 0, 0},
  {&__pyx_n_s_252, __pyx_k_252, sizeof(__pyx_k_252), 0, 0, 1, 1},
  {&__pyx_n_s_253, __pyx_k_253, sizeof(__pyx_k_253), 0, 0, 1, 1},
  {&__pyx_n_s_254, __pyx_k_254, sizeof(__pyx_k_254), 0, 0, 1, 1},
  {&__pyx_kp_s_255, __pyx_k_255, sizeof(__pyx_k_255), 0, 0, 1, 0},
  {&__pyx_n_s_256, __pyx_k_256, sizeof(__pyx_k_256), 0, 0, 1, 1},
  {&__pyx_kp_s_257, __pyx_k_257, sizeof(__pyx_k_257), 0, 0, 1, 0},
  {&__pyx_kp_s_262, __pyx_k_262, sizeof(__pyx_k_262), 0, 0, 1, 0},
  {&__pyx_n_s_263, __pyx_k_263, sizeof(__pyx_k_263), 0, 0, 1, 1},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
  {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
  {&__pyx_kp_s_340, __pyx_k_340, sizeof(__pyx_k_340), 0, 0, 1, 0},
  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
  {&__pyx_kp_s_359, __pyx_k_359, sizeof(__pyx_k_359), 0, 0, 1, 0},
  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
  {&__pyx_n_s_374, __pyx_k_374, sizeof(__pyx_k_374), 0, 0, 1, 1},
  {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
  {&__pyx_n_s_383, __pyx_k_383, sizeof(__pyx_k_383), 0, 0, 1, 1},
  {&__pyx_n_s_386, __pyx_k_386, sizeof(__pyx_k_386), 0, 0, 1, 1},
  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
  {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
  {&__pyx_n_s_427, __pyx_k_427, sizeof(__pyx_k_427), 0, 0, 1, 1},
  {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
  {&__pyx_n_s_430, __pyx_k_430, sizeof(__pyx_k_430), 0, 0, 1, 1},
  {&__pyx_kp_b_437, __pyx_k_437, sizeof(__pyx_k_437), 0, 0, 0, 0},
  {&__pyx_kp_b_438, __pyx_k_438, sizeof(__pyx_k_438), 0, 0, 0, 0},
  {&__pyx_kp_s_438, __pyx_k_438, sizeof(__pyx_k_438), 0, 0, 1, 0},
  {&__pyx_kp_b_440, __pyx_k_440, sizeof(__pyx_k_440), 0, 0, 0, 0},
  {&__pyx_kp_b_441, __pyx_k_441, sizeof(__pyx_k_441), 0, 0, 0, 0},
  {&__pyx_kp_s_441, __pyx_k_441, sizeof(__pyx_k_441), 0, 0, 1, 0},
  {&__pyx_kp_b_443, __pyx_k_443, sizeof(__pyx_k_443), 0, 0, 0, 0},
  {&__pyx_kp_b_444, __pyx_k_444, sizeof(__pyx_k_444), 0, 0, 0, 0},
  {&__pyx_kp_s_444, __pyx_k_444, sizeof(__pyx_k_444), 0, 0, 1, 0},
  {&__pyx_kp_b_446, __pyx_k_446, sizeof(__pyx_k_446), 0, 0, 0, 0},
  {&__pyx_kp_b_447, __pyx_k_447, sizeof(__pyx_k_447), 0, 0, 0, 0},
  {&__pyx_kp_s_447, __pyx_k_447, sizeof(__pyx_k_447), 0, 0, 1, 0},
  {&__pyx_kp_b_449, __pyx_k_449, sizeof(__pyx_k_449), 0, 0, 0, 0},
  {&__pyx_kp_b_450, __pyx_k_450, sizeof(__pyx_k_450), 0, 0, 0, 0},
  {&__pyx_kp_s_450, __pyx_k_450, sizeof(__pyx_k_450), 0, 0, 1, 0},
  {&__pyx_kp_b_452, __pyx_k_452, sizeof(__pyx_k_452), 0, 0, 0, 0},
  {&__pyx_kp_b_453, __pyx_k_453, sizeof(__pyx_k_453), 0, 0, 0, 0},
  {&__pyx_kp_s_453, __pyx_k_453, sizeof(__pyx_k_453), 0, 0, 1, 0},
  {&__pyx_n_s_459, __pyx_k_459, sizeof(__pyx_k_459), 0, 0, 1, 1},
  {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
  {&__pyx_n_s_462, __pyx_k_462, sizeof(__pyx_k_462), 0, 0, 1, 1},
  {&__pyx_kp_s_478, __pyx_k_478, sizeof(__pyx_k_478), 0, 0, 1, 0},
  {&__pyx_n_s_484, __pyx_k_484, sizeof(__pyx_k_484), 0, 0, 1, 1},
  {&__pyx_kp_s_489, __pyx_k_489, sizeof(__pyx_k_489), 0, 0, 1, 0},
  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
  {&__pyx_n_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 1},
  {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
  {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0},
  {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
  {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
  {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
  {&__pyx_n_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 1},
  {&__pyx_n_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 1},
  {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
  {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
  {&__pyx_n_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 1},
  {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 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_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
  {&__pyx_n_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 1},
  {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0},
  {&__pyx_kp_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_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0},
  {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0},
  {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0},
  {&__pyx_kp_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 0},
  {&__pyx_kp_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 0},
  {&__pyx_kp_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 0},
  {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0},
  {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 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__AS, __pyx_k__AS, sizeof(__pyx_k__AS), 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__C, __pyx_k__C, sizeof(__pyx_k__C), 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__MS, __pyx_k__MS, sizeof(__pyx_k__MS), 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__NotImplemented, __pyx_k__NotImplemented, sizeof(__pyx_k__NotImplemented), 0, 0, 1, 1},
  {&__pyx_n_s__OutOfBoundsDatetime, __pyx_k__OutOfBoundsDatetime, sizeof(__pyx_k__OutOfBoundsDatetime), 0, 0, 1, 1},
  {&__pyx_n_s__OverflowError, __pyx_k__OverflowError, sizeof(__pyx_k__OverflowError), 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__QS, __pyx_k__QS, sizeof(__pyx_k__QS), 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____int__, __pyx_k____int__, sizeof(__pyx_k____int__), 0, 0, 1, 1},
  {&__pyx_n_s____long__, __pyx_k____long__, sizeof(__pyx_k____long__), 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____nat_unpickle, __pyx_k____nat_unpickle, sizeof(__pyx_k____nat_unpickle), 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__dom, __pyx_k__dom, sizeof(__pyx_k__dom), 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__end_month, __pyx_k__end_month, sizeof(__pyx_k__end_month), 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__fix, __pyx_k__fix, sizeof(__pyx_k__fix), 0, 0, 1, 1},
  {&__pyx_n_s__flat, __pyx_k__flat, sizeof(__pyx_k__flat), 0, 0, 1, 1},
  {&__pyx_n_s__floor, __pyx_k__floor, sizeof(__pyx_k__floor), 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_start_end_field, __pyx_k__get_start_end_field, sizeof(__pyx_k__get_start_end_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__int8, __pyx_k__int8, sizeof(__pyx_k__int8), 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_business, __pyx_k__is_business, sizeof(__pyx_k__is_business), 0, 0, 1, 1},
  {&__pyx_n_s__is_month_end, __pyx_k__is_month_end, sizeof(__pyx_k__is_month_end), 0, 0, 1, 1},
  {&__pyx_n_s__is_month_start, __pyx_k__is_month_start, sizeof(__pyx_k__is_month_start), 0, 0, 1, 1},
  {&__pyx_n_s__is_quarter_end, __pyx_k__is_quarter_end, sizeof(__pyx_k__is_quarter_end), 0, 0, 1, 1},
  {&__pyx_n_s__is_quarter_start, __pyx_k__is_quarter_start, sizeof(__pyx_k__is_quarter_start), 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__is_year_end, __pyx_k__is_year_end, sizeof(__pyx_k__is_year_end), 0, 0, 1, 1},
  {&__pyx_n_s__is_year_start, __pyx_k__is_year_start, sizeof(__pyx_k__is_year_start), 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__ldom, __pyx_k__ldom, sizeof(__pyx_k__ldom), 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_kw, __pyx_k__month_kw, sizeof(__pyx_k__month_kw), 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__py_dt, __pyx_k__py_dt, sizeof(__pyx_k__py_dt), 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__start_month, __pyx_k__start_month, sizeof(__pyx_k__start_month), 0, 0, 1, 1},
  {&__pyx_n_s__startingMonth, __pyx_k__startingMonth, sizeof(__pyx_k__startingMonth), 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_julian_date, __pyx_k__to_julian_date, sizeof(__pyx_k__to_julian_date), 0, 0, 1, 1},
  {&__pyx_n_s__to_offset, __pyx_k__to_offset, sizeof(__pyx_k__to_offset), 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__tzoffset, __pyx_k__tzoffset, sizeof(__pyx_k__tzoffset), 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__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 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 = 71; __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 = 227; __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 = 1004; __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 = 3307; __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 = 82; __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 = 136; __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 = 179; __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 = 393; __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 = 536; __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 = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_NotImplemented = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_OverflowError = __Pyx_GetName(__pyx_b, __pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __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 = 1391; __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 = 1432; __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 = 1592; __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 = 3506; __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":170
 *     @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 = 170; __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":208
 * 
 *         try:
 *             stamp += self.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_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "pandas/tslib.pyx":213
 *         except ValueError:
 *             year2000 = self.replace(year=2000)
 *             stamp += year2000.strftime('%z')             # <<<<<<<<<<<<<<
 *             if self.tzinfo:
 *                 zone = _get_zone(self.tzinfo)
 */
  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_5);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "pandas/tslib.pyx":218
 * 
 *         try:
 *             stamp += zone.strftime(' %%Z')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_7);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "pandas/tslib.pyx":286
 *     @property
 *     def dayofyear(self):
 *         return self._get_field('doy')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_18 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__doy));
  PyTuple_SET_ITEM(__pyx_k_tuple_18, 0, ((PyObject *)__pyx_n_s__doy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__doy));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "pandas/tslib.pyx":290
 *     @property
 *     def week(self):
 *         return self._get_field('woy')             # <<<<<<<<<<<<<<
 * 
 *     weekofyear = week
 */
  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_19);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__woy));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));

  /* "pandas/tslib.pyx":296
 *     @property
 *     def quarter(self):
 *         return self._get_field('q')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__q));
  PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_n_s__q));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__q));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));

  /* "pandas/tslib.pyx":304
 *     @property
 *     def asm8(self):
 *         return np.int64(self.value).view('M8[ns]')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_21));
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_21));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_21));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "pandas/tslib.pyx":308
 *     @property
 *     def is_month_start(self):
 *         return self._get_start_end_field('is_month_start')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_24);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_month_start));
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_n_s__is_month_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_month_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));

  /* "pandas/tslib.pyx":312
 *     @property
 *     def is_month_end(self):
 *         return self._get_start_end_field('is_month_end')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_25);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_month_end));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_n_s__is_month_end));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_month_end));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));

  /* "pandas/tslib.pyx":316
 *     @property
 *     def is_quarter_start(self):
 *         return self._get_start_end_field('is_quarter_start')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_26);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_quarter_start));
  PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_n_s__is_quarter_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_quarter_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));

  /* "pandas/tslib.pyx":320
 *     @property
 *     def is_quarter_end(self):
 *         return self._get_start_end_field('is_quarter_end')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_27);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_quarter_end));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_n_s__is_quarter_end));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_quarter_end));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));

  /* "pandas/tslib.pyx":324
 *     @property
 *     def is_year_start(self):
 *         return self._get_start_end_field('is_year_start')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_28);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_year_start));
  PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_n_s__is_year_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_year_start));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));

  /* "pandas/tslib.pyx":328
 *     @property
 *     def is_year_end(self):
 *         return self._get_start_end_field('is_year_end')             # <<<<<<<<<<<<<<
 * 
 *     def tz_localize(self, tz):
 */
  __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_year_end));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_n_s__is_year_end));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_year_end));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));

  /* "pandas/tslib.pyx":346
 *             return Timestamp(self.to_pydatetime(), tz=tz)
 *         else:
 *             raise Exception('Cannot localize tz-aware Timestamp, use '             # <<<<<<<<<<<<<<
 *                             'tz_convert for conversions')
 * 
 */
  __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_30));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_30));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "pandas/tslib.pyx":364
 *         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_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_33);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_32));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_32));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));

  /* "pandas/tslib.pyx":478
 * 
 *     def __reduce__(self):
 *         return (__nat_unpickle, (None, ))             # <<<<<<<<<<<<<<
 * 
 * fields = ['year', 'quarter', 'month', 'day', 'hour',
 */
  __pyx_k_tuple_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_36);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));

  /* "pandas/tslib.pyx":536
 * 
 *     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_40 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_40);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
  PyTuple_SET_ITEM(__pyx_k_tuple_40, 0, ((PyObject *)__pyx_kp_s_39));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40));

  /* "pandas/tslib.pyx":596
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     new_values = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_k_tuple_41 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_41);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));

  /* "pandas/tslib.pyx":707
 *         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_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_44);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
  PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_43));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));

  /* "pandas/tslib.pyx":710
 *                                  '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_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_43));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "pandas/tslib.pyx":726
 * 
 *         if is_timedelta64_object(other):
 *             other_int = other.astype('timedelta64[ns]').view('i8')             # <<<<<<<<<<<<<<
 *             return Timestamp(self.value + other_int, tz=self.tzinfo, offset=self.offset)
 * 
 */
  __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __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));
  __pyx_k_tuple_48 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_48);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));

  /* "pandas/tslib.pyx":731
 *         elif 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), offset=self.offset)
 */
  __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_50);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_49));
  PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_49));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_49));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));

  /* "pandas/tslib.pyx":759
 * 
 *     cpdef _get_start_end_field(self, field):
 *         month_kw = self.freq.kwds.get('startingMonth', self.freq.kwds.get('month', 12)) if self.freq else 12             # <<<<<<<<<<<<<<
 *         freqstr = self.freqstr if self.freq else None
 *         out = get_start_end_field(np.array([self.value], dtype=np.int64), field, freqstr, month_kw)
 */
  __pyx_k_tuple_52 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_52);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__month));
  PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_n_s__month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month));
  __Pyx_INCREF(__pyx_int_12);
  PyTuple_SET_ITEM(__pyx_k_tuple_52, 1, __pyx_int_12);
  __Pyx_GIVEREF(__pyx_int_12);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));

  /* "pandas/tslib.pyx":827
 *         delta = delta.delta
 *     if is_timedelta64_object(delta):
 *         return delta.astype("timedelta64[ns]").item()             # <<<<<<<<<<<<<<
 *     if is_integer_object(delta):
 *         return delta
 */
  __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_53);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_46));
  PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));

  /* "pandas/tslib.pyx":1043
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = values[i]
 */
  __pyx_k_tuple_57 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_57);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));

  /* "pandas/tslib.pyx":1052
 *                 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_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_59);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_58));
  PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_kp_s_58));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_58));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));

  /* "pandas/tslib.pyx":1061
 *             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_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __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":1072
 * 
 * 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_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_63);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__0));
  PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_s__0));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__0));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));

  /* "pandas/tslib.pyx":1090
 * 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_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_67);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
  PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_s_66));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));

  /* "pandas/tslib.pyx":1109
 *     try:
 *         result = np.empty(n, dtype='M8[ns]')
 *         iresult = result.view('i8')             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             val = values[i]
 */
  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_71);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));

  /* "pandas/tslib.pyx":1128
 *                             raise
 *                     else:
 *                         raise ValueError('Tz-aware datetime.datetime cannot '             # <<<<<<<<<<<<<<
 *                                          'be converted to datetime64 unless '
 *                                          'utc=True')
 */
  __pyx_k_tuple_73 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_73);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_72));
  PyTuple_SET_ITEM(__pyx_k_tuple_73, 0, ((PyObject *)__pyx_kp_s_72));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));

  /* "pandas/tslib.pyx":1153
 *                     raise
 *             elif util.is_datetime64_object(val):
 *                 if val is np_NaT or val.view('i8') == iNaT:             # <<<<<<<<<<<<<<
 *                     iresult[i] = iNaT
 *                 else:
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));

  /* "pandas/tslib.pyx":1219
 *         # example
 *         if seen_integer and seen_datetime:
 *             raise ValueError("mixed datetimes and integers in passed array")             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
  __pyx_k_tuple_77 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_77);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_76));
  PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_kp_s_76));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));

  /* "pandas/tslib.pyx":1276
 *     n = values.shape[0]
 *     result = np.empty(n, dtype='m8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));

  /* "pandas/tslib.pyx":1306
 *     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_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_82);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__int64));
  PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, ((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));

  /* "pandas/tslib.pyx":1315
 *         else:
 *             if util.is_array(ts):
 *                 ts = ts.astype('int64').item()             # <<<<<<<<<<<<<<
 *             ts = cast_from_unit(ts, unit)
 *             if _np_version_under1p7:
 */
  __pyx_k_tuple_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_84);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__int64));
  PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int64));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));

  /* "pandas/tslib.pyx":1339
 *             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_87 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_87);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_46));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));

  /* "pandas/tslib.pyx":1357
 *    cdef object ivalue
 * 
 *    ivalue = value.view('i8')             # <<<<<<<<<<<<<<
 * 
 *    # put frac in seconds
 */
  __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __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":1419
 * 
 *     global _TimeRE_cache, _regex_cache
 *     with _cache_lock:             # <<<<<<<<<<<<<<
 *         if _getlang() != _TimeRE_cache.locale_time.lang:
 *             _TimeRE_cache = TimeRE()
 */
  __pyx_k_tuple_100 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_100);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_100, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_100, 2, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));

  /* "pandas/tslib.pyx":1445
 * 
 *     result = np.empty(n, dtype='M8[ns]')
 *     iresult = result.view('i8')             # <<<<<<<<<<<<<<
 * 
 *     dts.us = dts.ps = dts.as = 0
 */
  __pyx_k_tuple_101 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_101);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101));

  /* "pandas/tslib.pyx":1545
 *             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_104 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_104);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__p));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
  PyTuple_SET_ITEM(__pyx_k_tuple_104, 1, ((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));

  /* "pandas/tslib.pyx":1654
 *     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_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_107);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_106));
  PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));

  /* "pandas/tslib.pyx":1715
 *     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_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_108);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_106));
  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));

  /* "pandas/tslib.pyx":1785
 *             pos = trans.searchsorted(vals[0]) - 1
 *             if pos < 0:
 *                 raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 * 
 *             offset = deltas[pos]
 */
  __pyx_k_tuple_110 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_110);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_109));
  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));

  /* "pandas/tslib.pyx":1816
 *     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_111 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_111);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_109));
  PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));

  /* "pandas/tslib.pyx":1863
 *         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_112 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_112);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_109));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));

  /* "pandas/tslib.pyx":1882
 *     pos = trans.searchsorted(utc_date) - 1
 *     if pos < 0:
 *         raise ValueError('First time before start of DST info')             # <<<<<<<<<<<<<<
 * 
 *     offset = deltas[pos]
 */
  __pyx_k_tuple_113 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_113);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_109));
  PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_109));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));

  /* "pandas/tslib.pyx":1904
 *         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_115 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_115);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));

  /* "pandas/tslib.pyx":1979
 * 
 *     if not have_pytz:
 *         raise Exception("Could not find pytz module")             # <<<<<<<<<<<<<<
 * 
 *     if tz == UTC or tz is None:
 */
  __pyx_k_tuple_117 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_117);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_116));
  PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_kp_s_116));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_116));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));

  /* "pandas/tslib.pyx":2145
 *     count = len(dtindex)
 * 
 *     sa_dtype = [('Y', 'i4'), # year             # <<<<<<<<<<<<<<
 *                 ('M', 'i4'), # month
 *                 ('D', 'i4'), # day
 */
  __pyx_k_tuple_122 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_122);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Y));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 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_122, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));

  /* "pandas/tslib.pyx":2146
 * 
 *     sa_dtype = [('Y', 'i4'), # year
 *                 ('M', 'i4'), # month             # <<<<<<<<<<<<<<
 *                 ('D', 'i4'), # day
 *                 ('h', 'i4'), # hour
 */
  __pyx_k_tuple_123 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_123);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__M));
  PyTuple_SET_ITEM(__pyx_k_tuple_123, 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_123, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));

  /* "pandas/tslib.pyx":2147
 *     sa_dtype = [('Y', 'i4'), # year
 *                 ('M', 'i4'), # month
 *                 ('D', 'i4'), # day             # <<<<<<<<<<<<<<
 *                 ('h', 'i4'), # hour
 *                 ('m', 'i4'), # min
 */
  __pyx_k_tuple_124 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_124);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
  PyTuple_SET_ITEM(__pyx_k_tuple_124, 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_124, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));

  /* "pandas/tslib.pyx":2148
 *                 ('M', 'i4'), # month
 *                 ('D', 'i4'), # day
 *                 ('h', 'i4'), # hour             # <<<<<<<<<<<<<<
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second
 */
  __pyx_k_tuple_125 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_125);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__h));
  PyTuple_SET_ITEM(__pyx_k_tuple_125, 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_125, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));

  /* "pandas/tslib.pyx":2149
 *                 ('D', 'i4'), # day
 *                 ('h', 'i4'), # hour
 *                 ('m', 'i4'), # min             # <<<<<<<<<<<<<<
 *                 ('s', 'i4'), # second
 *                 ('u', 'i4')] # microsecond
 */
  __pyx_k_tuple_126 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_126);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_126, 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_126, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));

  /* "pandas/tslib.pyx":2150
 *                 ('h', 'i4'), # hour
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second             # <<<<<<<<<<<<<<
 *                 ('u', 'i4')] # microsecond
 * 
 */
  __pyx_k_tuple_127 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_127);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_127, 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_127, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));

  /* "pandas/tslib.pyx":2151
 *                 ('m', 'i4'), # min
 *                 ('s', 'i4'), # second
 *                 ('u', 'i4')] # microsecond             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty(count, dtype=sa_dtype)
 */
  __pyx_k_tuple_128 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_128);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__u));
  PyTuple_SET_ITEM(__pyx_k_tuple_128, 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_128, 1, ((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i4));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));

  /* "pandas/tslib.pyx":2705
 * 
 *     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_132 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_132);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_131));
  PyTuple_SET_ITEM(__pyx_k_tuple_132, 0, ((PyObject *)__pyx_kp_s_131));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_131));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));

  /* "pandas/tslib.pyx":2740
 * 
 *     if not have_pytz:
 *         raise Exception('Could not find pytz module')             # <<<<<<<<<<<<<<
 * 
 *     if _is_utc(tz):
 */
  __pyx_k_tuple_134 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_134);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_116));
  PyTuple_SET_ITEM(__pyx_k_tuple_134, 0, ((PyObject *)__pyx_kp_s_116));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_116));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134));

  /* "pandas/tslib.pyx":2937
 * 
 *     if retval == INT32_MIN:
 *         raise ValueError('Frequency conversion failed')             # <<<<<<<<<<<<<<
 * 
 *     return retval
 */
  __pyx_k_tuple_136 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_136);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_135));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 0, ((PyObject *)__pyx_kp_s_135));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_135));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136));

  /* "pandas/tslib.pyx":2968
 *         val = func(arr[i], relation, &finfo)
 *         if val == INT32_MIN:
 *             raise ValueError("Unable to convert to desired frequency.")             # <<<<<<<<<<<<<<
 *         result[i] = val
 * 
 */
  __pyx_k_tuple_138 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __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":3059
 * 
 *     if PyUnicode_Check(fmt):
 *         fmt = fmt.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     get_date_info(value, freq, &dinfo)
 */
  __pyx_k_tuple_152 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_152);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_151));
  PyTuple_SET_ITEM(__pyx_k_tuple_152, 0, ((PyObject *)__pyx_kp_s_151));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_151));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_152));

  /* "pandas/tslib.pyx":3077
 *         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_154 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_154);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_153));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 0, ((PyObject *)__pyx_kp_s_153));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_153));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154));

  /* "pandas/tslib.pyx":3095
 * 
 *     if PY2:
 *        result = result.decode('utf-8', 'ignore')             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_k_tuple_160 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_160);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_151));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 0, ((PyObject *)__pyx_kp_s_151));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_151));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ignore));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 1, ((PyObject *)__pyx_n_s__ignore));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ignore));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_160));

  /* "pandas/tslib.pyx":3353
 *         self.__calc_date_time()
 *         if _getlang() != self.lang:
 *             raise ValueError("locale changed during initialization")             # <<<<<<<<<<<<<<
 * 
 *     def __pad(self, seq, front):
 */
  __pyx_k_tuple_169 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_169);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_168));
  PyTuple_SET_ITEM(__pyx_k_tuple_169, 0, ((PyObject *)__pyx_kp_s_168));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_168));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_169));

  /* "pandas/tslib.pyx":3359
 *         seq = list(seq)
 *         if front:
 *             seq.insert(0, '')             # <<<<<<<<<<<<<<
 *         else:
 *             seq.append('')
 */
  __pyx_k_tuple_170 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_170);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 1, ((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));

  /* "pandas/tslib.pyx":3386
 *         # 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_171 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_171);
  __Pyx_INCREF(__pyx_int_01);
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 0, __pyx_int_01);
  __Pyx_GIVEREF(__pyx_int_01);
  __Pyx_INCREF(__pyx_int_22);
  PyTuple_SET_ITEM(__pyx_k_tuple_171, 1, __pyx_int_22);
  __Pyx_GIVEREF(__pyx_int_22);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_171));

  /* "pandas/tslib.pyx":3399
 *         # 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_173 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_173);
  __Pyx_INCREF(__pyx_int_1999);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 0, __pyx_int_1999);
  __Pyx_GIVEREF(__pyx_int_1999);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 1, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_17);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 2, __pyx_int_17);
  __Pyx_GIVEREF(__pyx_int_17);
  __Pyx_INCREF(__pyx_int_22);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 3, __pyx_int_22);
  __Pyx_GIVEREF(__pyx_int_22);
  __Pyx_INCREF(__pyx_int_44);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 4, __pyx_int_44);
  __Pyx_GIVEREF(__pyx_int_44);
  __Pyx_INCREF(__pyx_int_55);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 5, __pyx_int_55);
  __Pyx_GIVEREF(__pyx_int_55);
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 6, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __Pyx_INCREF(__pyx_int_76);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 7, __pyx_int_76);
  __Pyx_GIVEREF(__pyx_int_76);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_173, 8, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173));
  __pyx_k_tuple_174 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_174);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_173));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 0, ((PyObject *)__pyx_k_tuple_173));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));

  /* "pandas/tslib.pyx":3404
 *         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_179 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_179);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_97));
  PyTuple_SET_ITEM(__pyx_k_tuple_179, 0, ((PyObject *)__pyx_kp_s_97));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_97));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_178));
  PyTuple_SET_ITEM(__pyx_k_tuple_179, 1, ((PyObject *)__pyx_kp_s_178));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_178));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179));

  /* "pandas/tslib.pyx":3407
 *                     (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_184 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_184);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__1999));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 0, ((PyObject *)__pyx_kp_s__1999));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__1999));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_139));
  PyTuple_SET_ITEM(__pyx_k_tuple_184, 1, ((PyObject *)__pyx_kp_s_139));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_139));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
  __pyx_k_tuple_186 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_186);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__99));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 0, ((PyObject *)__pyx_kp_s__99));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__99));
  __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 = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_188);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__22));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 0, ((PyObject *)__pyx_kp_s__22));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__22));
  __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":3408
 *                     (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_190 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_190);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__44));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 0, ((PyObject *)__pyx_kp_s__44));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__44));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_189));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 1, ((PyObject *)__pyx_kp_s_189));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_189));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __pyx_k_tuple_192 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_192);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__55));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 0, ((PyObject *)__pyx_kp_s__55));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__55));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_191));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 1, ((PyObject *)__pyx_kp_s_191));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_191));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __pyx_k_tuple_194 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_194);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__76));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 0, ((PyObject *)__pyx_kp_s__76));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__76));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_193));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 1, ((PyObject *)__pyx_kp_s_193));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_193));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));

  /* "pandas/tslib.pyx":3409
 *                     ('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_195 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_195);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__17));
  PyTuple_SET_ITEM(__pyx_k_tuple_195, 0, ((PyObject *)__pyx_kp_s__17));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__17));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_155));
  PyTuple_SET_ITEM(__pyx_k_tuple_195, 1, ((PyObject *)__pyx_kp_s_155));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_155));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195));
  __pyx_k_tuple_197 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_197);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__03));
  PyTuple_SET_ITEM(__pyx_k_tuple_197, 0, ((PyObject *)__pyx_kp_s__03));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__03));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_196));
  PyTuple_SET_ITEM(__pyx_k_tuple_197, 1, ((PyObject *)__pyx_kp_s_196));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_196));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_197));
  __pyx_k_tuple_198 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_198)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_198);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__3));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 0, ((PyObject *)__pyx_kp_s__3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__3));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_196));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 1, ((PyObject *)__pyx_kp_s_196));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_196));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198));

  /* "pandas/tslib.pyx":3411
 *                     ('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_200 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_200);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__2));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 0, ((PyObject *)__pyx_kp_s__2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__2));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_199));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 1, ((PyObject *)__pyx_kp_s_199));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_199));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_200));
  __pyx_k_tuple_202 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_202);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s__10));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 0, ((PyObject *)__pyx_kp_s__10));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__10));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_201));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 1, ((PyObject *)__pyx_kp_s_201));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_201));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202));

  /* "pandas/tslib.pyx":3414
 *         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_204 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_204)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_204);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_175));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 1, ((PyObject *)__pyx_kp_s_175));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_175));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_204));
  __pyx_k_tuple_205 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_205);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_205, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_176));
  PyTuple_SET_ITEM(__pyx_k_tuple_205, 1, ((PyObject *)__pyx_kp_s_176));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_176));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_205));
  __pyx_k_tuple_206 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_206);
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 0, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_177));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 1, ((PyObject *)__pyx_kp_s_177));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_177));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_206));
  __pyx_k_tuple_207 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_207)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_207);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_204));
  PyTuple_SET_ITEM(__pyx_k_tuple_207, 0, ((PyObject *)__pyx_k_tuple_204));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_204));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_205));
  PyTuple_SET_ITEM(__pyx_k_tuple_207, 1, ((PyObject *)__pyx_k_tuple_205));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_205));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_206));
  PyTuple_SET_ITEM(__pyx_k_tuple_207, 2, ((PyObject *)__pyx_k_tuple_206));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_206));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_207));

  /* "pandas/tslib.pyx":3426
 *             # 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_208 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_208);
  __Pyx_INCREF(__pyx_int_1999);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 0, __pyx_int_1999);
  __Pyx_GIVEREF(__pyx_int_1999);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 1, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 2, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 3, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 4, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 5, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_INCREF(__pyx_int_6);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 6, __pyx_int_6);
  __Pyx_GIVEREF(__pyx_int_6);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 7, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 8, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208));
  __pyx_k_tuple_209 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_209);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_208));
  PyTuple_SET_ITEM(__pyx_k_tuple_209, 0, ((PyObject *)__pyx_k_tuple_208));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_209));

  /* "pandas/tslib.pyx":3492
 *                                 '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_224 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_224);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__U));
  PyTuple_SET_ITEM(__pyx_k_tuple_224, 0, ((PyObject *)__pyx_n_s__U));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__U));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_224));
  __pyx_k_tuple_225 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_225)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_225);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__U));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 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_225, 1, ((PyObject *)__pyx_n_s__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__W));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_225));

  /* "pandas/tslib.pyx":3527
 *         # 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_230 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_230)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_230);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_229));
  PyTuple_SET_ITEM(__pyx_k_tuple_230, 0, ((PyObject *)__pyx_kp_s_229));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_229));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_230));

  /* "pandas/tslib.pyx":3529
 *         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_233 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_233);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_232));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 0, ((PyObject *)__pyx_kp_s_232));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_232));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_233));

  /* "pandas/tslib.pyx":3532
 *         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_234 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_234)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_234);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_97));
  PyTuple_SET_ITEM(__pyx_k_tuple_234, 0, ((PyObject *)__pyx_kp_s_97));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_97));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_234));

  /* "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_239 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_239)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_239);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_238));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 0, ((PyObject *)__pyx_kp_u_238));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_238));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_239));

  /* "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_241 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_241)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_241);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_240));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 0, ((PyObject *)__pyx_kp_u_240));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_240));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_241));

  /* "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_243 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_243)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_243);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_242));
  PyTuple_SET_ITEM(__pyx_k_tuple_243, 0, ((PyObject *)__pyx_kp_u_242));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_242));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_243));

  /* "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_246 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_246)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_246);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_245));
  PyTuple_SET_ITEM(__pyx_k_tuple_246, 0, ((PyObject *)__pyx_kp_u_245));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_245));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_246));

  /* "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_247 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_247)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_247);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_242));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 0, ((PyObject *)__pyx_kp_u_242));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_242));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_247));

  /* "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_249 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_249)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_249);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_248));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 0, ((PyObject *)__pyx_kp_u_248));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_248));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_249));

  /* "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_250 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_250);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
  PyTuple_SET_ITEM(__pyx_k_tuple_250, 0, ((PyObject *)__pyx_kp_s_39));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250));

  /* "util.pxd":57
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
  __pyx_k_tuple_251 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_251)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_251);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
  PyTuple_SET_ITEM(__pyx_k_tuple_251, 0, ((PyObject *)__pyx_kp_s_39));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_251));

  /* "pandas/tslib.pyx":64
 * 
 * # < numpy 1.7 compat for NaT
 * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item()             # <<<<<<<<<<<<<<
 * 
 * # numpy actual nat object
 */
  __pyx_k_tuple_258 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_258);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_79));
  PyTuple_SET_ITEM(__pyx_k_tuple_258, 0, ((PyObject *)__pyx_kp_s_79));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_79));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_258));

  /* "pandas/tslib.pyx":67
 * 
 * # numpy actual nat object
 * np_NaT = np.datetime64('NaT',dtype='M8')             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_k_tuple_259 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_259);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NaT));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 0, ((PyObject *)__pyx_n_s__NaT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NaT));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_259));

  /* "pandas/tslib.pyx":74
 *     basestring = str
 * 
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_260 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_260)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_260);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_260, 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_260, 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_260, 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_260, 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_260, 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_260, 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_260, 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_260, 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_260, 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_260, 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_260, 10, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_260));
  __pyx_k_codeobj_261 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__ints_to_pydatetime, 74, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":129
 * from dateutil.tz import tzlocal
 * 
 * def _is_tzlocal(tz):             # <<<<<<<<<<<<<<
 *     return isinstance(tz, tzlocal)
 * 
 */
  __pyx_k_tuple_264 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_264);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_264));
  __pyx_k_codeobj_265 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___is_tzlocal, 129, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":132
 *     return isinstance(tz, tzlocal)
 * 
 * def _is_fixed_offset(tz):             # <<<<<<<<<<<<<<
 *     try:
 *         tz._transition_info
 */
  __pyx_k_tuple_266 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_266)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_266);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_266));
  __pyx_k_codeobj_267 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___is_fixed_offset, 132, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":139
 *         return True
 * 
 * _zero_time = datetime_time(0, 0)             # <<<<<<<<<<<<<<
 * 
 * # Python front end to C extension type _Timestamp
 */
  __pyx_k_tuple_268 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_268);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_268));

  /* "pandas/tslib.pyx":151
 * 
 *     @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_269 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_269)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_269);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_269, 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_269, 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_269, 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_269, 3, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_269));
  __pyx_k_codeobj_270 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__fromordinal, 151, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_271 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_271);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_271));

  /* "pandas/tslib.pyx":157
 * 
 *     @classmethod
 *     def now(cls, tz=None):             # <<<<<<<<<<<<<<
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):
 */
  __pyx_k_tuple_272 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_272)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_272);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_272, 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_272, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_272));
  __pyx_k_codeobj_273 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__now, 157, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_274 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_274);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_274, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_274));

  /* "pandas/tslib.pyx":164
 * 
 *     @classmethod
 *     def today(cls):             # <<<<<<<<<<<<<<
 *         """ compat today with datetime """
 *         return cls(datetime.today())
 */
  __pyx_k_tuple_275 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_275)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_275);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_275, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_275));
  __pyx_k_codeobj_276 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__today, 164, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":169
 * 
 *     @classmethod
 *     def utcnow(cls):             # <<<<<<<<<<<<<<
 *         return cls.now('UTC')
 * 
 */
  __pyx_k_tuple_277 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_277);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 0, ((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cls));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_277));
  __pyx_k_codeobj_278 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__utcnow, 169, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":172
 *         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_279 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_279)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_279);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_279, 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_279, 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_279, 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_279, 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_279, 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_279, 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_279, 6, ((PyObject *)__pyx_n_s__ts_base));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts_base));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__to_offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_279, 7, ((PyObject *)__pyx_n_s__to_offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__to_offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_279));
  __pyx_k_codeobj_280 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____new__, 172, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_281 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_281);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_281, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_281, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_281, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_281));

  /* "pandas/tslib.pyx":203
 *         return ts_base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         stamp = self._repr_base
 *         zone = None
 */
  __pyx_k_tuple_282 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_282)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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__stamp));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 1, ((PyObject *)__pyx_n_s__stamp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stamp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__zone));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 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_282, 3, ((PyObject *)__pyx_n_s__year2000));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year2000));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 4, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 5, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_282));
  __pyx_k_codeobj_283 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____repr__, 203, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":228
 * 
 *     @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_284 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __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_GIVEREF(((PyObject *)__pyx_k_tuple_284));
  __pyx_k_codeobj_285 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___date_repr, 228, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_285)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":234
 * 
 *     @property
 *     def _time_repr(self):             # <<<<<<<<<<<<<<
 *         result = '%.2d:%.2d:%.2d' % (self.hour, self.minute, self.second)
 * 
 */
  __pyx_k_tuple_286 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_286);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 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_286, 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_286, 2, ((PyObject *)__pyx_n_s__nanos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nanos));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286));
  __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___time_repr, 234, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":246
 * 
 *     @property
 *     def _repr_base(self):             # <<<<<<<<<<<<<<
 *         return '%s %s' % (self._date_repr, self._time_repr)
 * 
 */
  __pyx_k_tuple_288 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_288)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_288);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_288));
  __pyx_k_codeobj_289 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___repr_base, 246, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":250
 * 
 *     @property
 *     def tz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for tzinfo
 */
  __pyx_k_tuple_290 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_290);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_290));
  __pyx_k_codeobj_291 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tz, 250, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_291)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":257
 * 
 *     @property
 *     def freq(self):             # <<<<<<<<<<<<<<
 *         return self.offset
 * 
 */
  __pyx_k_tuple_292 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_292);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292));
  __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__freq, 257, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":260
 *         return self.offset
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         self.value = state[0]
 *         self.offset = state[1]
 */
  __pyx_k_tuple_294 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_294)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_294);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 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_294, 1, ((PyObject *)__pyx_n_s__state));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__state));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_294));
  __pyx_k_codeobj_295 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____setstate__, 260, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":265
 *         self.tzinfo = state[2]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         object_state = self.value, self.offset, self.tzinfo
 *         return (Timestamp, object_state)
 */
  __pyx_k_tuple_296 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_296);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 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_296, 1, ((PyObject *)__pyx_n_s__object_state));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__object_state));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_296));
  __pyx_k_codeobj_297 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____reduce__, 265, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":269
 *         return (Timestamp, object_state)
 * 
 *     def to_period(self, freq=None):             # <<<<<<<<<<<<<<
 *         """
 *         Return an period of which this timestamp is an observation.
 */
  __pyx_k_tuple_298 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_298)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_298);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 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_298, 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_298, 2, ((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Period));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_298));
  __pyx_k_codeobj_299 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__to_period, 269, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_300 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_300);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_300));

  /* "pandas/tslib.pyx":281
 * 
 *     @property
 *     def dayofweek(self):             # <<<<<<<<<<<<<<
 *         return self.weekday()
 * 
 */
  __pyx_k_tuple_301 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_301)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __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_GIVEREF(((PyObject *)__pyx_k_tuple_301));
  __pyx_k_codeobj_302 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__dayofweek, 281, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_302)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":285
 * 
 *     @property
 *     def dayofyear(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('doy')
 * 
 */
  __pyx_k_tuple_303 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_303)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __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_GIVEREF(((PyObject *)__pyx_k_tuple_303));
  __pyx_k_codeobj_304 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__dayofyear, 285, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_304)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":289
 * 
 *     @property
 *     def week(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('woy')
 * 
 */
  __pyx_k_tuple_305 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __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_GIVEREF(((PyObject *)__pyx_k_tuple_305));
  __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__week, 289, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":295
 * 
 *     @property
 *     def quarter(self):             # <<<<<<<<<<<<<<
 *         return self._get_field('q')
 * 
 */
  __pyx_k_tuple_307 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_307)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __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_GIVEREF(((PyObject *)__pyx_k_tuple_307));
  __pyx_k_codeobj_308 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__quarter, 295, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_308)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":299
 * 
 *     @property
 *     def freqstr(self):             # <<<<<<<<<<<<<<
 *         return getattr(self.offset, 'freqstr', self.offset)
 * 
 */
  __pyx_k_tuple_309 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_309)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_309);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_309));
  __pyx_k_codeobj_310 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__freqstr, 299, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_310)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":303
 * 
 *     @property
 *     def asm8(self):             # <<<<<<<<<<<<<<
 *         return np.int64(self.value).view('M8[ns]')
 * 
 */
  __pyx_k_tuple_311 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_311)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_311);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_311, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_311));
  __pyx_k_codeobj_312 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__asm8, 303, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_312)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":307
 * 
 *     @property
 *     def is_month_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_month_start')
 * 
 */
  __pyx_k_tuple_313 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_313)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_313);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_313, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_313));
  __pyx_k_codeobj_314 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__is_month_start, 307, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_314)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":311
 * 
 *     @property
 *     def is_month_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_month_end')
 * 
 */
  __pyx_k_tuple_315 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_315)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __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_262, __pyx_n_s__is_month_end, 311, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_316)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":315
 * 
 *     @property
 *     def is_quarter_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_quarter_start')
 * 
 */
  __pyx_k_tuple_317 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_317)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __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_262, __pyx_n_s__is_quarter_start, 315, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_318)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":319
 * 
 *     @property
 *     def is_quarter_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_quarter_end')
 * 
 */
  __pyx_k_tuple_319 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_319)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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_262, __pyx_n_s__is_quarter_end, 319, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_320)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":323
 * 
 *     @property
 *     def is_year_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_year_start')
 * 
 */
  __pyx_k_tuple_321 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_321)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __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_262, __pyx_n_s__is_year_start, 323, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_322)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":327
 * 
 *     @property
 *     def is_year_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_year_end')
 * 
 */
  __pyx_k_tuple_323 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_323)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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_262, __pyx_n_s__is_year_end, 327, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_324)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":330
 *         return self._get_start_end_field('is_year_end')
 * 
 *     def tz_localize(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert naive Timestamp to local time zone
 */
  __pyx_k_tuple_325 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_325)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_325);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_325, 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_325, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_325));
  __pyx_k_codeobj_326 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tz_localize, 330, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_326)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":349
 *                             'tz_convert for conversions')
 * 
 *     def tz_convert(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert Timestamp to another time zone or localize to requested time
 */
  __pyx_k_tuple_327 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_327)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_327);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_327, 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_327, 1, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_327));
  __pyx_k_codeobj_328 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tz_convert, 349, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_328)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":372
 *     astimezone = tz_convert
 * 
 *     def replace(self, **kwds):             # <<<<<<<<<<<<<<
 *         return Timestamp(datetime.replace(self, **kwds),
 *                          offset=self.offset)
 */
  __pyx_k_tuple_329 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_329)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_329);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 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_329, 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_329, 2, ((PyObject *)__pyx_n_s__kwds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kwds));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_329));
  __pyx_k_codeobj_330 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__replace, 372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_330)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":376
 *                          offset=self.offset)
 * 
 *     def to_pydatetime(self, warn=True):             # <<<<<<<<<<<<<<
 *         """
 *         If warn=True, issue warning if nanoseconds is nonzero
 */
  __pyx_k_tuple_331 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_331)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_331);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_331, 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_331, 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_331, 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_331, 3, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_331));
  __pyx_k_codeobj_332 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__to_pydatetime, 376, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_332)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":392
 *                         ts.dts.us, ts.tzinfo)
 * 
 *     def isoformat(self, sep='T'):             # <<<<<<<<<<<<<<
 *         base = super(_Timestamp, self).isoformat(sep=sep)
 *         if self.nanosecond == 0:
 */
  __pyx_k_tuple_333 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_333)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_333);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_333, 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_333, 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_333, 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_333, 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_333, 4, ((PyObject *)__pyx_n_s__base2));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_333));
  __pyx_k_codeobj_334 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__isoformat, 392, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_334)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_335 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_335)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_335);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_n_s__T)));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 0, ((PyObject *)((PyObject*)__pyx_n_s__T)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_n_s__T)));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_335));

  /* "pandas/tslib.pyx":409
 *         return base1 + base2
 * 
 *     def _has_time_component(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns if the Timestamp has a time component
 */
  __pyx_k_tuple_336 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_336)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_336);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_336, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_336));
  __pyx_k_codeobj_337 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___has_time_component, 409, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_337)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":418
 *                 or self.nanosecond != 0)
 * 
 *     def to_julian_date(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert TimeStamp to a Julian Date.
 */
  __pyx_k_tuple_338 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_338)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_338);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_338, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_338, 1, ((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_338, 2, ((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_338, 3, ((PyObject *)__pyx_n_s__day));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_338));
  __pyx_k_codeobj_339 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__to_julian_date, 418, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_339)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":447
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef _NaT base
 * 
 */
  __pyx_k_tuple_341 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_341)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_341);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cls));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 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_341, 1, ((PyObject *)__pyx_n_s__base));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_341));
  __pyx_k_codeobj_342 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____new__, 447, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_342)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":456
 *         return base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_k_tuple_343 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_343)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_343);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_343));
  __pyx_k_codeobj_344 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____repr__, 456, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_344)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":459
 *         return 'NaT'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_k_tuple_345 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_345)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_345);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_345));
  __pyx_k_codeobj_346 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____str__, 459, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_346)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":462
 *         return 'NaT'
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return iNaT
 * 
 */
  __pyx_k_tuple_347 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_347)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_347);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_347, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_347));
  __pyx_k_codeobj_348 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____hash__, 462, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_348)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":465
 *         return iNaT
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return NPY_NAT
 * 
 */
  __pyx_k_tuple_349 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_349)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_349);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_349, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_349));
  __pyx_k_codeobj_350 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____int__, 465, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_350)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":468
 *         return NPY_NAT
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return NPY_NAT
 * 
 */
  __pyx_k_tuple_351 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_351)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_351);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_351, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_351));
  __pyx_k_codeobj_352 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____long__, 468, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_352)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":471
 *         return NPY_NAT
 * 
 *     def weekday(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_k_tuple_353 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_353)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_353);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_353, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_353));
  __pyx_k_codeobj_354 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__weekday, 471, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_354)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":474
 *         return -1
 * 
 *     def toordinal(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_k_tuple_355 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_355)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_355);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_355, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_355));
  __pyx_k_codeobj_356 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__toordinal, 474, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_356)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":477
 *         return -1
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return (__nat_unpickle, (None, ))
 * 
 */
  __pyx_k_tuple_357 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_357)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_357);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_357, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_357));
  __pyx_k_codeobj_358 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____reduce__, 477, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_358)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":487
 *     setattr(NaTType, field, prop)
 * 
 * def __nat_unpickle(*args):             # <<<<<<<<<<<<<<
 *     # return constant defined in the module
 *     return NaT
 */
  __pyx_k_tuple_360 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_360)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_360);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__args));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 0, ((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__args));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__args));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 1, ((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__args));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_360));
  __pyx_k_codeobj_361 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____nat_unpickle, 487, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_361)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":511
 *         return ', tz=%s' % zone
 * 
 * def is_timestamp_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_362 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_362)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_362);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 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_362, 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_362, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_362));
  __pyx_k_codeobj_363 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__is_timestamp_array, 511, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_363)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":561
 * # Frequency inference
 * 
 * def unique_deltas(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_364 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_364)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_364);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 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_364, 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_364, 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_364, 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_364, 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_364, 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_364, 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_364, 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_364, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_364));
  __pyx_k_codeobj_365 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__unique_deltas, 561, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_365)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":589
 * 
 * 
 * def apply_offset(ndarray[object] values, object offset):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_366 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_366)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_366);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_366, 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_366, 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_366, 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_366, 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_366, 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_366, 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_366, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_366));
  __pyx_k_codeobj_367 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_366, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__apply_offset, 589, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_367)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":823
 * 
 * 
 * def _delta_to_nanoseconds(delta):             # <<<<<<<<<<<<<<
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta
 */
  __pyx_k_tuple_368 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_368)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_368);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__delta));
  PyTuple_SET_ITEM(__pyx_k_tuple_368, 0, ((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_368));
  __pyx_k_codeobj_369 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_51, 823, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_369)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":985
 * 
 * 
 * def get_timezone(tz):             # <<<<<<<<<<<<<<
 *     return _get_zone(tz)
 * 
 */
  __pyx_k_tuple_370 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_370)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_370);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_370, 0, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_370));
  __pyx_k_codeobj_371 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__get_timezone, 985, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_371)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1034
 * #     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_372 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_372)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_372);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_372, 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_372, 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_372, 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_372, 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_372, 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_372, 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_372, 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_372, 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_372, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_372));
  __pyx_k_codeobj_373 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_374, 1034, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_373)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1071
 * _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_375 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_375)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_375);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date_string));
  PyTuple_SET_ITEM(__pyx_k_tuple_375, 0, ((PyObject *)__pyx_n_s__date_string));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date_string));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_375));
  __pyx_k_codeobj_376 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_65, 1071, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_376)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1088
 *     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_377 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_377)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_377);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date_string));
  PyTuple_SET_ITEM(__pyx_k_tuple_377, 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_377, 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_377, 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_377, 3, ((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_377));
  __pyx_k_codeobj_378 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_75, 1088, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_378)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1095
 *     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_379 = PyTuple_New(20); if (unlikely(!__pyx_k_tuple_379)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_379);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 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_379, 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_379, 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_379, 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_379, 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_379, 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_379, 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_379, 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_379, 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_379, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__py_dt));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 10, ((PyObject *)__pyx_n_s__py_dt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__py_dt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 11, ((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_379, 12, ((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_379, 13, ((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_379, 14, ((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_379, 15, ((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_379, 16, ((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_379, 17, ((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_379, 18, ((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_379, 19, ((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(7, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__array_to_datetime, 1095, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_380)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1266
 *         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_381 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_381)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_381);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 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_381, 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_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__iresult));
  PyTuple_SET_ITEM(__pyx_k_tuple_381, 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_381, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_381));
  __pyx_k_codeobj_382 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_383, 1266, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_382)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1282
 *     return iresult
 * 
 * def convert_to_timedelta(object ts, object unit='ns', coerce=False):             # <<<<<<<<<<<<<<
 *     return convert_to_timedelta64(ts, unit, coerce)
 * 
 */
  __pyx_k_tuple_384 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_384)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_384);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 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_384, 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_384, 2, ((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__coerce));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_384));
  __pyx_k_codeobj_385 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_386, 1282, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_385)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1341
 *     return ts.astype('timedelta64[ns]')
 * 
 * def repr_timedelta64(object value, format=None):             # <<<<<<<<<<<<<<
 *    """
 *     provide repr for timedelta64
 */
  __pyx_k_tuple_387 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_387)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_387);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_387, 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_387, 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_387, 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_387, 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_387, 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_387, 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_387, 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_387, 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_387, 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_387, 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_387, 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_387, 11, ((PyObject *)__pyx_n_s__sign_pretty));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sign_pretty));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_387));
  __pyx_k_codeobj_388 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__repr_timedelta64, 1341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_388)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1410
 * 
 * 
 * def array_strptime(ndarray[object] values, object fmt, coerce=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_389 = PyTuple_New(37); if (unlikely(!__pyx_k_tuple_389)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_389);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 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_389, 36, ((PyObject *)__pyx_n_s__datetime_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_389));
  __pyx_k_codeobj_390 = (PyObject*)__Pyx_PyCode_New(3, 0, 37, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__array_strptime, 1410, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_390)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1696
 *     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_391 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_391)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_391);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 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_391, 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_391, 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_391, 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_391, 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_391, 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_391, 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_391, 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_391, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_391));
  __pyx_k_codeobj_392 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__cast_to_nanoseconds, 1696, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_392)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1728
 * 
 * 
 * def pydt_to_i8(object pydt):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert to int64 representation compatible with numpy datetime64; converts
 */
  __pyx_k_tuple_393 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_393)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_393);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pydt));
  PyTuple_SET_ITEM(__pyx_k_tuple_393, 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_393, 1, ((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_393));
  __pyx_k_codeobj_394 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__pydt_to_i8, 1728, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_394)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1740
 *     return ts.value
 * 
 * def i8_to_pydt(int64_t i8, object tzinfo = None):             # <<<<<<<<<<<<<<
 *     '''
 *     Inverse of pydt_to_i8
 */
  __pyx_k_tuple_395 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_395)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_395);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_395, 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_395, 1, ((PyObject *)__pyx_n_s__tzinfo));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzinfo));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_395));
  __pyx_k_codeobj_396 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_395, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__i8_to_pydt, 1740, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_396)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1757
 *     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_397 = PyTuple_New(17); if (unlikely(!__pyx_k_tuple_397)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_397);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vals));
  PyTuple_SET_ITEM(__pyx_k_tuple_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 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_397, 16, ((PyObject *)__pyx_n_s__trans_len));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__trans_len));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_397));
  __pyx_k_codeobj_398 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tz_convert, 1757, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_398)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1838
 *     return result
 * 
 * def tz_convert_single(int64_t val, object tz1, object tz2):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[int64_t] trans, deltas
 */
  __pyx_k_tuple_399 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_399)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_399);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 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_399, 12, ((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__delta));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_399));
  __pyx_k_codeobj_400 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tz_convert_single, 1838, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1891
 * utc_offset_cache = {}
 * 
 * def _get_transitions(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC times of DST transitions
 */
  __pyx_k_tuple_401 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_401)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_401);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_401, 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_401, 1, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_401));
  __pyx_k_codeobj_402 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___get_transitions, 1891, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_402)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1915
 *     return trans_cache[tz]
 * 
 * def _get_deltas(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC offsets in microseconds corresponding to DST transitions
 */
  __pyx_k_tuple_403 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_403)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_403);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tz));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 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_403, 1, ((PyObject *)__pyx_n_s__num));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__num));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_403));
  __pyx_k_codeobj_404 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s___get_deltas, 1915, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_404)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1940
 *             10**6)
 * 
 * def tot_seconds(td):             # <<<<<<<<<<<<<<
 *     return total_seconds(td)
 * 
 */
  __pyx_k_tuple_405 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_405)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_405);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__td));
  PyTuple_SET_ITEM(__pyx_k_tuple_405, 0, ((PyObject *)__pyx_n_s__td));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__td));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_405));
  __pyx_k_codeobj_406 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_405, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tot_seconds, 1940, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_406)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":1959
 * @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_407 = PyTuple_New(32); if (unlikely(!__pyx_k_tuple_407)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_407);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vals));
  PyTuple_SET_ITEM(__pyx_k_tuple_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 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_407, 31, ((PyObject *)__pyx_n_s__b_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b_idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_407));
  __pyx_k_codeobj_408 = (PyObject*)__Pyx_PyCode_New(3, 0, 32, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_407, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__tz_localize_to_utc, 1959, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_408)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2133
 * #----------------------------------------------------------------------
 * 
 * def build_field_sarray(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */
  __pyx_k_tuple_409 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_409)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_409);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 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_409, 13, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_409));
  __pyx_k_codeobj_410 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__build_field_sarray, 2133, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_410)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2175
 *     return out
 * 
 * def get_time_micros(ndarray[int64_t] dtindex):             # <<<<<<<<<<<<<<
 *     '''
 *     Datetime as int64 representation to a structured array of fields
 */
  __pyx_k_tuple_411 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_411)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_411);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_411, 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_411, 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_411, 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_411, 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_411, 4, ((PyObject *)__pyx_n_s__micros));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__micros));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_411));
  __pyx_k_codeobj_412 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_411, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__get_time_micros, 2175, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_412)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2194
 * 
 * @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_413 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_413)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_413);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 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_413, 13, ((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__woy));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_413));
  __pyx_k_codeobj_414 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__get_date_field, 2194, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_414)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2338
 * 
 * @cython.wraparound(False)
 * def get_start_end_field(ndarray[int64_t] dtindex, object field, object freqstr=None, int month_kw=12):             # <<<<<<<<<<<<<<
 *     '''
 *     Given an int64-based datetime index return array of indicators
 */
  __pyx_k_tuple_415 = PyTuple_New(19); if (unlikely(!__pyx_k_tuple_415)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_415);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtindex));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 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_415, 1, ((PyObject *)__pyx_n_s__field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__freqstr));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 2, ((PyObject *)__pyx_n_s__freqstr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__freqstr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__month_kw));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 3, ((PyObject *)__pyx_n_s__month_kw));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__month_kw));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ts));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 4, ((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_415, 5, ((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_415, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__is_business));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 7, ((PyObject *)__pyx_n_s__is_business));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__is_business));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__end_month));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 8, ((PyObject *)__pyx_n_s__end_month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end_month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__start_month));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 9, ((PyObject *)__pyx_n_s__start_month));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start_month));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 10, ((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_415, 11, ((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_415, 12, ((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_415, 13, ((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_415, 14, ((PyObject *)__pyx_n_s__mo_off));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mo_off));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dom));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 15, ((PyObject *)__pyx_n_s__dom));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dom));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__doy));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 16, ((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_415, 17, ((PyObject *)__pyx_n_s__dow));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dow));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ldom));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 18, ((PyObject *)__pyx_n_s__ldom));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ldom));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_415));
  __pyx_k_codeobj_416 = (PyObject*)__Pyx_PyCode_New(4, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_415, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__get_start_end_field, 2338, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_416)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2563
 * 
 * 
 * def date_normalize(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
  __pyx_k_tuple_417 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_417)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_417);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stamps));
  PyTuple_SET_ITEM(__pyx_k_tuple_417, 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_417, 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_417, 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_417, 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_417, 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_417, 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_417, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_417));
  __pyx_k_codeobj_418 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_417, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__date_normalize, 2563, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_418)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2658
 * 
 * 
 * def dates_normalized(ndarray[int64_t] stamps, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(stamps)
 */
  __pyx_k_tuple_419 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_419)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_419);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stamps));
  PyTuple_SET_ITEM(__pyx_k_tuple_419, 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_419, 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_419, 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_419, 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_419, 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_419, 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_419, 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_419, 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_419, 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_419, 9, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_419));
  __pyx_k_codeobj_420 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_419, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__dates_normalized, 2658, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_420)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2696
 * #----------------------------------------------------------------------
 * 
 * def isleapyear(int64_t year):             # <<<<<<<<<<<<<<
 *     return is_leapyear(year)
 * 
 */
  __pyx_k_tuple_421 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_421)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_421);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 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_421, 1, ((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__year));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_421));
  __pyx_k_codeobj_422 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__isleapyear, 2696, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_422)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2699
 *     return is_leapyear(year)
 * 
 * def monthrange(int64_t year, int64_t month):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int64_t days
 */
  __pyx_k_tuple_423 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_423)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_423);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_423, 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_423, 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_423, 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_423, 3, ((PyObject *)__pyx_n_s__day_of_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__day_of_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_423));
  __pyx_k_codeobj_424 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_423, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__monthrange, 2699, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_424)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2878
 *     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_425 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_425)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_425);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dtarr));
  PyTuple_SET_ITEM(__pyx_k_tuple_425, 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_425, 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_425, 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_425, 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_425, 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_425, 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_425, 6, ((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_425));
  __pyx_k_codeobj_426 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_427, 2878, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_426)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2901
 *     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_428 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_428)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_428);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__periodarr));
  PyTuple_SET_ITEM(__pyx_k_tuple_428, 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_428, 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_428, 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_428, 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_428, 4, ((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_428));
  __pyx_k_codeobj_429 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_430, 2901, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_429)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2941
 *     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_431 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_431)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_431);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_431, 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_431, 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_431, 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_431, 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_431, 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_431, 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_431, 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_431, 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_431, 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_431, 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_431, 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_431, 11, ((PyObject *)__pyx_n_s__relation));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__relation));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_431));
  __pyx_k_codeobj_432 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__period_asfreq_arr, 2941, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_432)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":2973
 *     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_433 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_433)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_433);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 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_433, 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_433, 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_433, 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_433, 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_433, 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_433, 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_433, 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_433, 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_433, 9, ((PyObject *)__pyx_n_s__ordinal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ordinal));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_433));
  __pyx_k_codeobj_434 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__period_ordinal, 2973, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_434)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3000
 *     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_435 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_435)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_435);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
  PyTuple_SET_ITEM(__pyx_k_tuple_435, 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_435, 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_435, 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_435, 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_435, 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_435, 5, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_435));
  __pyx_k_codeobj_436 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__period_format, 3000, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_436)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3038
 * 
 * 
 * cdef list extra_fmts = [(b"%q", b"^`AB`^"),             # <<<<<<<<<<<<<<
 *                         (b"%f", b"^`CD`^"),
 *                         (b"%F", b"^`EF`^"),
 */
  __pyx_k_tuple_439 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_439)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_439);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_437));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 0, ((PyObject *)__pyx_kp_b_437));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_437));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_438));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 1, ((PyObject *)__pyx_kp_b_438));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_438));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_439));

  /* "pandas/tslib.pyx":3039
 * 
 * cdef list extra_fmts = [(b"%q", b"^`AB`^"),
 *                         (b"%f", b"^`CD`^"),             # <<<<<<<<<<<<<<
 *                         (b"%F", b"^`EF`^"),
 *                         (b"%l", b"^`GH`^"),
 */
  __pyx_k_tuple_442 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_442)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_442);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_440));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 0, ((PyObject *)__pyx_kp_b_440));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_440));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_441));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 1, ((PyObject *)__pyx_kp_b_441));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_441));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_442));

  /* "pandas/tslib.pyx":3040
 * 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_445 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_445)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_445);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_443));
  PyTuple_SET_ITEM(__pyx_k_tuple_445, 0, ((PyObject *)__pyx_kp_b_443));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_443));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_444));
  PyTuple_SET_ITEM(__pyx_k_tuple_445, 1, ((PyObject *)__pyx_kp_b_444));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_444));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_445));

  /* "pandas/tslib.pyx":3041
 *                         (b"%f", b"^`CD`^"),
 *                         (b"%F", b"^`EF`^"),
 *                         (b"%l", b"^`GH`^"),             # <<<<<<<<<<<<<<
 *                         (b"%u", b"^`IJ`^"),
 *                         (b"%n", b"^`KL`^")]
 */
  __pyx_k_tuple_448 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_448)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_448);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_446));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 0, ((PyObject *)__pyx_kp_b_446));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_446));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_447));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 1, ((PyObject *)__pyx_kp_b_447));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_447));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_448));

  /* "pandas/tslib.pyx":3042
 *                         (b"%F", b"^`EF`^"),
 *                         (b"%l", b"^`GH`^"),
 *                         (b"%u", b"^`IJ`^"),             # <<<<<<<<<<<<<<
 *                         (b"%n", b"^`KL`^")]
 * 
 */
  __pyx_k_tuple_451 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_451)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_451);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_449));
  PyTuple_SET_ITEM(__pyx_k_tuple_451, 0, ((PyObject *)__pyx_kp_b_449));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_449));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_450));
  PyTuple_SET_ITEM(__pyx_k_tuple_451, 1, ((PyObject *)__pyx_kp_b_450));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_450));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_451));

  /* "pandas/tslib.pyx":3043
 *                         (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_454 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_454)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_454);
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_452));
  PyTuple_SET_ITEM(__pyx_k_tuple_454, 0, ((PyObject *)__pyx_kp_b_452));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_452));
  __Pyx_INCREF(((PyObject *)__pyx_kp_b_453));
  PyTuple_SET_ITEM(__pyx_k_tuple_454, 1, ((PyObject *)__pyx_kp_b_453));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_453));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_454));

  /* "pandas/tslib.pyx":3103
 * 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_455 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_455)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_455);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__code));
  PyTuple_SET_ITEM(__pyx_k_tuple_455, 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_455, 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_455, 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_455, 3, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_455));
  __pyx_k_codeobj_456 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_455, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__get_period_field, 3103, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_456)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3109
 *     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_457 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_457)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_457);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__code));
  PyTuple_SET_ITEM(__pyx_k_tuple_457, 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_457, 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_457, 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_457, 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_457, 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_457, 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_457, 6, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_457));
  __pyx_k_codeobj_458 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_457, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_459, 3109, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_458)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3155
 * 
 * 
 * def extract_ordinals(ndarray[object] values, freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_460 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_460)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_460);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_460, 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_460, 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_460, 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_460, 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_460, 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_460, 5, ((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_460));
  __pyx_k_codeobj_461 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__extract_ordinals, 3155, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_461)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3303
 * __all__ = []
 * 
 * def _getlang():             # <<<<<<<<<<<<<<
 *     # Figure out what the current language is set to.
 *     return locale.getlocale(locale.LC_TIME)
 */
  __pyx_k_codeobj_463 = (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_262, __pyx_n_s___getlang, 3303, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_463)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3326
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Set all attributes.
 * 
 */
  __pyx_k_tuple_464 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_464)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_464);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_464, 0, ((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_464));
  __pyx_k_codeobj_465 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____init__, 3326, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_465)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3355
 *             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_466 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_466)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_466);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_466, 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_466, 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_466, 2, ((PyObject *)__pyx_n_s__front));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__front));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_466));
  __pyx_k_codeobj_467 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____pad, 3355, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_467)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3364
 *         return seq
 * 
 *     def __calc_weekday(self):             # <<<<<<<<<<<<<<
 *         # Set self.a_weekday and self.f_weekday using the calendar
 *         # module.
 */
  __pyx_k_tuple_468 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_468)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_468);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 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_468, 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_468, 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_468, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_468));
  __pyx_k_codeobj_469 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____calc_weekday, 3364, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_469)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3372
 *         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_470 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_470)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_470);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_470, 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_470, 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_470, 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_470, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_470));
  __pyx_k_codeobj_471 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____calc_month, 3372, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_471)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3379
 *         self.f_month = f_month
 * 
 *     def __calc_am_pm(self):             # <<<<<<<<<<<<<<
 *         # Set self.am_pm by using time.strftime().
 * 
 */
  __pyx_k_tuple_472 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_472)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_472);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_472, 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_472, 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_472, 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_472, 3, ((PyObject *)__pyx_n_s__time_tuple));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__time_tuple));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_472));
  __pyx_k_codeobj_473 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____calc_am_pm, 3379, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_473)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3391
 *         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_474 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_474)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_474);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_474, 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_474, 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_474, 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_474, 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_474, 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_474, 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_474, 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_474, 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_474, 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_474, 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_474, 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_474, 11, ((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tz));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_474));
  __pyx_k_codeobj_475 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____calc_date_time, 3391, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_475)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3436
 *         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_476 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_476)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_476);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_476, 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_476, 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_476, 2, ((PyObject *)__pyx_n_s__has_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__has_saving));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_476));
  __pyx_k_codeobj_477 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____calc_timezone, 3436, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_477)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3455
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */
  __pyx_k_tuple_479 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_479)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_479);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_479, 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_479, 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_479, 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_479, 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_479, 4, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_479));
  __pyx_k_codeobj_480 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____init__, 3455, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_480)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_k_tuple_481 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_481)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_481);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_481));

  /* "pandas/tslib.pyx":3497
 *         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_482 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_482)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_482);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_482, 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_482, 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_482, 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_482, 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_482, 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_482, 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_482, 6, ((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_482));
  __pyx_k_codeobj_483 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s____seqToRE, 3497, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_483)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3516
 *         return '%s)' % regex
 * 
 *     def pattern(self, format):             # <<<<<<<<<<<<<<
 *         """Return regex pattern for the format string.
 * 
 */
  __pyx_k_tuple_485 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_485)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_485);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 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_485, 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_485, 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_485, 3, ((PyObject *)__pyx_n_s__regex_chars));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regex_chars));
  __Pyx_INCREF(((PyObject *)__pyx_n_s_484));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 4, ((PyObject *)__pyx_n_s_484));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s_484));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__directive_index));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 5, ((PyObject *)__pyx_n_s__directive_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__directive_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_485));
  __pyx_k_codeobj_486 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__pattern, 3516, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_486)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3539
 *         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_487 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_487)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_487);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
  PyTuple_SET_ITEM(__pyx_k_tuple_487, 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_487, 1, ((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_487));
  __pyx_k_codeobj_488 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s__compile, 3539, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_488)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/tslib.pyx":3550
 * _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_490 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_490)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_490);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyTuple_SET_ITEM(__pyx_k_tuple_490, 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_490, 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_490, 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_490, 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_490, 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_490, 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_490, 6, ((PyObject *)__pyx_n_s__days_to_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__days_to_week));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_490));
  __pyx_k_codeobj_491 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_262, __pyx_n_s_105, 3550, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_491)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __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_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__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_153 = PyInt_FromLong(153); if (unlikely(!__pyx_int_153)) {__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_400 = PyInt_FromLong(400); if (unlikely(!__pyx_int_400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_457 = PyInt_FromLong(457); if (unlikely(!__pyx_int_457)) {__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_vtable_6pandas_5tslib__Timestamp._get_start_end_field = (PyObject *(*)(struct __pyx_obj_6pandas_5tslib__Timestamp *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5tslib_10_Timestamp__get_start_end_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 = 630; __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 = 630; __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 = 630; __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 = 782; __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 = 782; __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 = 782; __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 = 836; __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 = 836; __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 = 3455; __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 = 3488; __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 = 3497; __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 = 3512; __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 (int8_t, 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 dateutil.tz import tzoffset
 */
  __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 dateutil.tz import tzoffset
 * 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 dateutil.tz import tzoffset             # <<<<<<<<<<<<<<
 * from pandas.compat import parse_date
 * 
 */
  __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__tzoffset));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tzoffset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzoffset));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_252), ((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__tzoffset);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__tzoffset);
    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__tzoffset, __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":38
 * from datetime import time as datetime_time
 * from dateutil.tz import tzoffset
 * from pandas.compat import parse_date             # <<<<<<<<<<<<<<
 * 
 * from sys import version_info
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_253), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __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__parse_date);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__parse_date);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parse_date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __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":40
 * from pandas.compat import parse_date
 * 
 * from sys import version_info             # <<<<<<<<<<<<<<
 * 
 * # numpy compat
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__version_info));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__version_info));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__version_info));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __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__version_info);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__version_info);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__version_info, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __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'
 */
  __pyx_t_2 = PyList_New(1); 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_INCREF(((PyObject *)__pyx_n_s__LooseVersion));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__LooseVersion));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LooseVersion));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_254), ((PyObject *)__pyx_t_2), -1); 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(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__LooseVersion);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__LooseVersion);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__LooseVersion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __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":44
 * # 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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); 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_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__version); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__short_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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___np_version, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":45
 * 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_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__LooseVersion); 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 = __Pyx_GetName(__pyx_m, __pyx_n_s___np_version); 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);
  __pyx_t_3 = PyTuple_New(1); 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);
  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 = 45; __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_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_255), Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_256, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":46
 * _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 = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___np_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __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 = 46; __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 = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_257), Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_85, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":49
 * 
 * # GH3363
 * cdef bint PY2 = version_info[0] == 2             # <<<<<<<<<<<<<<
 * 
 * # initialize numpy
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__version_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __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 = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6pandas_5tslib_PY2 = __pyx_t_4;

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

  /* "pandas/tslib.pyx":56
 * 
 * # import datetime C API
 * PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # in numpy 1.7, will prob need the following:
 */
  PyDateTime_IMPORT;

  /* "pandas/tslib.pyx":61
 * # 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":64
 * 
 * # < numpy 1.7 compat for NaT
 * compat_NaT = np.array([NPY_NAT]).astype('m8[ns]').item()             # <<<<<<<<<<<<<<
 * 
 * # numpy actual nat object
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_6pandas_5tslib_NPY_NAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__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 = 64; __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__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_258), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__compat_NaT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":67
 * 
 * # 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 = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__M8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_259), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np_NaT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":69
 * 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":70
 * 
 * try:
 *     basestring             # <<<<<<<<<<<<<<
 * except NameError: # py3
 *     basestring = str
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __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_L9_try_end;
    __pyx_L2_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;

    /* "pandas/tslib.pyx":71
 * 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_2, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);

      /* "pandas/tslib.pyx":72
 *     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 = 72; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      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":74
 *     basestring = str
 * 
 * def ints_to_pydatetime(ndarray[int64_t] arr, tz=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_1ints_to_pydatetime, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ints_to_pydatetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":127
 *     return result
 * 
 * from dateutil.tz import tzlocal             # <<<<<<<<<<<<<<
 * 
 * def _is_tzlocal(tz):
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tzlocal));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tzlocal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tzlocal));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_252), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__tzlocal);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__tzlocal);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tzlocal, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":129
 * 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_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __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 = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":132
 *     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_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___is_fixed_offset, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":139
 *         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 = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_268), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___zero_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":143
 * # 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_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "pandas/tslib.pyx":151
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_270)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_271));
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__fromordinal, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":157
 * 
 *     @classmethod
 *     def now(cls, tz=None):             # <<<<<<<<<<<<<<
 *         """ compat now with datetime """
 *         if isinstance(tz, basestring):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_3now, __Pyx_CYFUNCTION_CLASSMETHOD, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_273)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, ((PyObject *)__pyx_k_tuple_274));
  __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__now, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":164
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_276)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__today, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":169
 * 
 *     @classmethod
 *     def utcnow(cls):             # <<<<<<<<<<<<<<
 *         return cls.now('UTC')
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_7utcnow, __Pyx_CYFUNCTION_CLASSMETHOD, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_278)); 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_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__utcnow, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":172
 *         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_263, ((PyObject *)__pyx_k_codeobj_280)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_281));
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____new__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":203
 *         return ts_base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         stamp = self._repr_base
 *         zone = None
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_11__repr__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_283)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____repr__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":228
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_285)); 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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s___date_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":234
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_287)); 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 = PyTuple_New(1); 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);
  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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s___time_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":246
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_289)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s___repr_base, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":250
 * 
 *     @property
 *     def tz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Alias for tzinfo
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_19tz, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_291)); 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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __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_builtin_property, ((PyObject *)__pyx_t_2), 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_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__tz, __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":257
 * 
 *     @property
 *     def freq(self):             # <<<<<<<<<<<<<<
 *         return self.offset
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_21freq, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_293)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__freq, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":260
 *         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_263, ((PyObject *)__pyx_k_codeobj_295)); 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);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____setstate__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":265
 *         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_263, ((PyObject *)__pyx_k_codeobj_297)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____reduce__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":269
 *         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_263, ((PyObject *)__pyx_k_codeobj_299)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_300));
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__to_period, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":281
 * 
 *     @property
 *     def dayofweek(self):             # <<<<<<<<<<<<<<
 *         return self.weekday()
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_29dayofweek, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_302)); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__dayofweek, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":285
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_304)); 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);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__dayofyear, __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":289
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_306)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __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 = 288; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__week, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":292
 *         return self._get_field('woy')
 * 
 *     weekofyear = week             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __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 = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__weekofyear, __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":295
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_308)); 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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__quarter, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":299
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_310)); 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);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__freqstr, __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":303
 * 
 *     @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_263, ((PyObject *)__pyx_k_codeobj_312)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __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 = 302; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__asm8, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":307
 * 
 *     @property
 *     def is_month_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_month_start')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_41is_month_start, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_314)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __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 = 306; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__is_month_start, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":311
 * 
 *     @property
 *     def is_month_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_month_end')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_43is_month_end, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_316)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __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 = 310; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__is_month_end, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":315
 * 
 *     @property
 *     def is_quarter_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_quarter_start')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_45is_quarter_start, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_318)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __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 = 314; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__is_quarter_start, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":319
 * 
 *     @property
 *     def is_quarter_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_quarter_end')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_47is_quarter_end, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_320)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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 = 318; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__is_quarter_end, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":323
 * 
 *     @property
 *     def is_year_start(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_year_start')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_49is_year_start, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_322)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__is_year_start, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":327
 * 
 *     @property
 *     def is_year_end(self):             # <<<<<<<<<<<<<<
 *         return self._get_start_end_field('is_year_end')
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_51is_year_end, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_324)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 = 326; __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_builtin_property, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__is_year_end, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":330
 *         return self._get_start_end_field('is_year_end')
 * 
 *     def tz_localize(self, tz):             # <<<<<<<<<<<<<<
 *         """
 *         Convert naive Timestamp to local time zone
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_53tz_localize, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_326)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__tz_localize, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":349
 *                             '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_55tz_convert, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_328)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__tz_convert, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":370
 *             return Timestamp(self.value, tz=tz)
 * 
 *     astimezone = tz_convert             # <<<<<<<<<<<<<<
 * 
 *     def replace(self, **kwds):
 */
  __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __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 = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__astimezone, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":372
 *     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_57replace, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_330)); 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);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__replace, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":376
 *                          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_59to_pydatetime, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_332)); 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);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_3, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_3)->__pyx_arg_warn = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_3, __pyx_pf_6pandas_5tslib_9Timestamp_66__defaults__);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__to_pydatetime, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":392
 *                         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_61isoformat, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_334)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, ((PyObject *)__pyx_k_tuple_335));
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__isoformat, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":409
 *         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_63_has_time_component, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_337)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s___has_time_component, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":418
 *                 or self.nanosecond != 0)
 * 
 *     def to_julian_date(self):             # <<<<<<<<<<<<<<
 *         """
 *         Convert TimeStamp to a Julian Date.
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_9Timestamp_65to_julian_date, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_339)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__to_julian_date, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":143
 * # 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 = 143; __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_1), "__doc__", ((PyObject *)__pyx_kp_s_340)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1), __pyx_n_s__Timestamp, __pyx_n_s_263); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __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__Timestamp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":443
 *                 )/24.0)
 * 
 * _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 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (unlikely(PySet_Add(__pyx_t_1, ((PyObject *)__pyx_n_s__NaT)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_1, ((PyObject *)__pyx_n_s__nat)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_1, ((PyObject *)__pyx_n_s__NAT)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_1, ((PyObject *)__pyx_n_s__nan)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_1, ((PyObject *)__pyx_n_s__NaN)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(PySet_Add(__pyx_t_1, ((PyObject *)__pyx_n_s__NAN)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___nat_strings, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":444
 * 
 * _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 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "pandas/tslib.pyx":447
 *     """(N)ot-(A)-(T)ime, the time equivalent of NaN"""
 * 
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef _NaT base
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_342)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____new__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":456
 *         return base
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_3__repr__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_344)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____repr__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":459
 *         return 'NaT'
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return 'NaT'
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_5__str__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_346)); 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);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____str__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":462
 *         return 'NaT'
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return iNaT
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_7__hash__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_348)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____hash__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":465
 *         return iNaT
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return NPY_NAT
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_9__int__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_350)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____int__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":468
 *         return NPY_NAT
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<<
 *         return NPY_NAT
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_11__long__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_352)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____long__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":471
 *         return NPY_NAT
 * 
 *     def weekday(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_13weekday, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_354)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__weekday, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":474
 *         return -1
 * 
 *     def toordinal(self):             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_15toordinal, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_356)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__toordinal, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":477
 *         return -1
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return (__nat_unpickle, (None, ))
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7NaTType_17__reduce__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_358)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____reduce__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/tslib.pyx":444
 * 
 * _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 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_6pandas_5tslib__NaT)));
  if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_359)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__NaTType, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __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__NaTType, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":480
 *         return (__nat_unpickle, (None, ))
 * 
 * fields = ['year', 'quarter', 'month', 'day', 'hour',             # <<<<<<<<<<<<<<
 *           'minute', 'second', 'microsecond', 'nanosecond',
 *           'week', 'dayofyear']
 */
  __pyx_t_1 = PyList_New(11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__year));
  PyList_SET_ITEM(__pyx_t_1, 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_1, 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_1, 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_1, 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_1, 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_1, 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_1, 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_1, 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_1, 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_1, 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_1, 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_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":483
 *           'minute', 'second', 'microsecond', 'nanosecond',
 *           'week', 'dayofyear']
 * for field in fields:             # <<<<<<<<<<<<<<
 *     prop = property(fget=lambda self: -1)
 *     setattr(NaTType, field, prop)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __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_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_10(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__field, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":484
 *           'week', 'dayofyear']
 * for field in fields:
 *     prop = property(fget=lambda self: -1)             # <<<<<<<<<<<<<<
 *     setattr(NaTType, field, prop)
 * 
 */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_104lambda1, 0, NULL, __pyx_n_s_263, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__fget), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__prop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/tslib.pyx":485
 * for field in fields:
 *     prop = property(fget=lambda self: -1)
 *     setattr(NaTType, field, prop)             # <<<<<<<<<<<<<<
 * 
 * def __nat_unpickle(*args):
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__NaTType); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__prop); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = PyObject_SetAttr(__pyx_t_2, __pyx_t_1, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __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_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":487
 *     setattr(NaTType, field, prop)
 * 
 * def __nat_unpickle(*args):             # <<<<<<<<<<<<<<
 *     # return constant defined in the module
 *     return NaT
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_7__nat_unpickle, NULL, __pyx_n_s_263); 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);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____nat_unpickle, __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;

  /* "pandas/tslib.pyx":491
 *     return NaT
 * 
 * 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 = 491; __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 = 491; __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 = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":493
 * 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 = 493; __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 = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":511
 *         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_9is_timestamp_array, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __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 = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":547
 * # 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":548
 * # 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":551
 * 
 * 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":552
 * 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":554
 * 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 = 554; __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 = 554; __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 = 554; __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_11, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __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_1)); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_t_1, __pyx_n_s__min, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":555
 * 
 * Timestamp.min = Timestamp(_NS_LOWER_BOUND)
 * Timestamp.max = Timestamp(_NS_UPPER_BOUND)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 555; __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 = 555; __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_1, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __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_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 = 555; __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 = 555; __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":561
 * # 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_13unique_deltas, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":589
 * 
 * 
 * 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_15apply_offset, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __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 = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":616
 * 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":617
 * 
 * _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":618
 * _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":619
 * _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":620
 * _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":621
 * _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":624
 * 
 * 
 * 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":765
 * 
 * 
 * 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 = 765; __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":774
 * 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":775
 * 
 * _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":776
 * _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":777
 * _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":778
 * _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":779
 * _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":823
 * 
 * 
 * def _delta_to_nanoseconds(delta):             # <<<<<<<<<<<<<<
 *     if hasattr(delta, 'delta'):
 *         delta = delta.delta
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_17_delta_to_nanoseconds, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_51, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":985
 * 
 * 
 * def get_timezone(tz):             # <<<<<<<<<<<<<<
 *     return _get_zone(tz)
 * 
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_21get_timezone, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __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 = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1004
 * 
 * 
 * class OutOfBoundsDatetime(ValueError):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __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 = 1004; __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_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_11), __pyx_n_s__OutOfBoundsDatetime, __pyx_n_s_263); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __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__OutOfBoundsDatetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1034
 * #     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_23datetime_to_datetime64, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_374, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1069
 *     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 = 1069; __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 = 1069; __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 = 1069; __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 = 1069; __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 = 1069; __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 = 1069; __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 = 1069; __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 = 1069; __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 = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_64, ((PyObject *)__pyx_t_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1071
 * _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_25_does_string_look_like_datetime, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_65, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1088
 *     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_27parse_datetime_string, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_75, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1095
 *     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 = 1095; __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 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_69 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1096
 * 
 * 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 = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_70 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1095
 *     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_29array_to_datetime, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __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 = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1266
 *         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 = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_78 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_31array_to_timedelta64, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_383, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1282
 *     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 = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_81 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_33convert_to_timedelta, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_386, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1341
 *     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_35repr_timedelta64, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __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 = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1410
 * 
 * 
 * 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 = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_k_95 = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_37array_strptime, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __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 = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1696
 *     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_41cast_to_nanoseconds, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __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 = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1728
 * 
 * 
 * def pydt_to_i8(object pydt):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert to int64 representation compatible with numpy datetime64; converts
 */
  __pyx_t_11 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_43pydt_to_i8, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __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 = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1740
 *     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_45i8_to_pydt, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __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 = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":1749
 * # 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":1750
 * 
 * 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 = 1750; __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_1 = __Pyx_Import(((PyObject *)__pyx_n_s_252), ((PyObject *)__pyx_t_11), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_1, __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 = 1750; __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 = 1750; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":1751
 * try:
 *     from dateutil.tz import tzutc as _du_utc
 *     import pytz             # <<<<<<<<<<<<<<
 *     UTC = pytz.utc
 *     have_pytz = True
 */
      __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pytz), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pytz, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pandas/tslib.pyx":1752
 *     from dateutil.tz import tzutc as _du_utc
 *     import pytz
 *     UTC = pytz.utc             # <<<<<<<<<<<<<<
 *     have_pytz = True
 * except:
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pytz); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__utc); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UTC, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pandas/tslib.pyx":1753
 *     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 = 1753; __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 = 1753; __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_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "pandas/tslib.pyx":1754
 *     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_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);

      /* "pandas/tslib.pyx":1755
 *     have_pytz = True
 * except:
 *     have_pytz = False             # <<<<<<<<<<<<<<
 * 
 * def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):
 */
      __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__have_pytz, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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":1757
 *     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_47tz_convert, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __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 = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1838
 *     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_49tz_convert_single, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __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 = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1888
 * 
 * 
 * trans_cache = {}             # <<<<<<<<<<<<<<
 * utc_offset_cache = {}
 * 
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __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 = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1889
 * 
 * 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 = 1889; __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 = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1891
 * utc_offset_cache = {}
 * 
 * def _get_transitions(tz):             # <<<<<<<<<<<<<<
 *     """
 *     Get UTC times of DST transitions
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_51_get_transitions, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __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 = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1915
 *     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_53_get_deltas, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __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 = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1940
 *             10**6)
 * 
 * def tot_seconds(td):             # <<<<<<<<<<<<<<
 *     return total_seconds(td)
 * 
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_55tot_seconds, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __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 = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":1959
 * @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_59tz_localize_to_utc, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __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 = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2133
 * #----------------------------------------------------------------------
 * 
 * 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_61build_field_sarray, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __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 = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2175
 *     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_63get_time_micros, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __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 = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2194
 * 
 * @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_65get_date_field, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __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 = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2338
 * 
 * @cython.wraparound(False)
 * def get_start_end_field(ndarray[int64_t] dtindex, object field, object freqstr=None, int month_kw=12):             # <<<<<<<<<<<<<<
 *     '''
 *     Given an int64-based datetime index return array of indicators
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_67get_start_end_field, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_start_end_field, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2560
 *     return ts_dayofweek(ts)
 * 
 * cdef int64_t DAY_NS = 86400000000000LL             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_6pandas_5tslib_DAY_NS = 86400000000000LL;

  /* "pandas/tslib.pyx":2563
 * 
 * 
 * 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_69date_normalize, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2563; __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 = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2658
 * 
 * 
 * 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_71dates_normalized, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __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 = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2696
 * #----------------------------------------------------------------------
 * 
 * def isleapyear(int64_t year):             # <<<<<<<<<<<<<<
 *     return is_leapyear(year)
 * 
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_73isleapyear, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2696; __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 = 2696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2699
 *     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_75monthrange, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __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 = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2853
 *     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":2878
 *     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_79dt64arr_to_periodarr, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_427, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2901
 *     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_81periodarr_to_dt64arr, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_430, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2919
 *     return out
 * 
 * cdef char START = 'S'             # <<<<<<<<<<<<<<
 * cdef char END = 'E'
 * 
 */
  __pyx_v_6pandas_5tslib_START = 'S';

  /* "pandas/tslib.pyx":2920
 * 
 * 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":2941
 *     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_85period_asfreq_arr, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; __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 = 2941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":2973
 *     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_87period_ordinal, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __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 = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3000
 *     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_91period_format, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __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 = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3043
 *                         (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 = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_439));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_k_tuple_439));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_439));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_442));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_k_tuple_442));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_442));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_445));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_k_tuple_445));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_445));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_448));
  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_k_tuple_448));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_448));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_451));
  PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_k_tuple_451));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_451));
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_454));
  PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_k_tuple_454));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_454));
  __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":3045
 *                         (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 = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_438));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_438));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_438));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_441));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_441));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_441));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_444));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_kp_s_444));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_444));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_447));
  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_kp_s_447));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_447));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_450));
  PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_450));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_450));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_453));
  PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_kp_s_453));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_453));
  __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":3103
 * 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_93get_period_field, NULL, __pyx_n_s_263); 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);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_period_field, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3109
 *     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_95get_period_field_arr, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_459, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3155
 * 
 * 
 * def extract_ordinals(ndarray[object] values, freq):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5tslib_97extract_ordinals, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __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 = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

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

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

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

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

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

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

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

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

  /* "pandas/tslib.pyx":3284
 * 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 = 3284; __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_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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 = 3284; __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 = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3285
 * 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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__IGNORECASE));
  PyList_SET_ITEM(__pyx_t_1, 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_1), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__IGNORECASE);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__IGNORECASE);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IGNORECASE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3286
 * 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 = 3286; __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_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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 = 3286; __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 = 3286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3287
 * 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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__date);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__date);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__datetime_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3290
 * 
 * # 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":3291
 * # 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 = 3291; __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_1 = __Pyx_Import(((PyObject *)__pyx_n_s__thread), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __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 = 3291; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      }
      __Pyx_GOTREF(__pyx_t_3);
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s_462, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __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_L31_try_end;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/tslib.pyx":3292
 * 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_1, &__pyx_t_3, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_11);

      /* "pandas/tslib.pyx":3293
 *     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":3294
 * except:
 *     try:
 *         from _thread import allocate_lock as _thread_allocate_lock             # <<<<<<<<<<<<<<
 *     except:
 *         try:
 */
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(((PyObject *)__pyx_n_s__allocate_lock));
          PyList_SET_ITEM(__pyx_t_2, 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_2), -1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__allocate_lock);
          if (__pyx_t_2 == NULL) {
            if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__allocate_lock);
            if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          }
          __Pyx_GOTREF(__pyx_t_2);
          if (PyObject_SetAttr(__pyx_m, __pyx_n_s_462, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "pandas/tslib.pyx":3295
 *     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_2, &__pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L36_except_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_17);

          /* "pandas/tslib.pyx":3296
 *         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":3297
 *     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 = 3297; __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 = 3297; __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 = 3297; __pyx_clineno = __LINE__; goto __pyx_L44_error;}
              }
              __Pyx_GOTREF(__pyx_t_21);
              if (PyObject_SetAttr(__pyx_m, __pyx_n_s_462, __pyx_t_21) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __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":3298
 *         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 = 3298; __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":3299
 *             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 = 3299; __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 = 3299; __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 = 3299; __pyx_clineno = __LINE__; goto __pyx_L46_except_error;}
              }
              __Pyx_GOTREF(__pyx_t_24);
              if (PyObject_SetAttr(__pyx_m, __pyx_n_s_462, __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; __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_2); __pyx_t_2 = 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_1); __pyx_t_1 = 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":3301
 *             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 = 3301; __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 = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3303
 * __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_101_getlang, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __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 = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3307
 *     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 = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));

  /* "pandas/tslib.pyx":3326
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Set all attributes.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_10LocaleTime_1__init__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_465)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __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 = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3355
 *             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_263, ((PyObject *)__pyx_k_codeobj_467)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __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 = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3364
 *         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_263, ((PyObject *)__pyx_k_codeobj_469)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_163, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3372
 *         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_263, ((PyObject *)__pyx_k_codeobj_471)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_164, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3379
 *         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_263, ((PyObject *)__pyx_k_codeobj_473)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_165, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3391
 *         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_263, ((PyObject *)__pyx_k_codeobj_475)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_167, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3436
 *         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_263, ((PyObject *)__pyx_k_codeobj_477)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s_166, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3307
 *     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 = 3307; __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_478)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_11), __pyx_n_s__LocaleTime, __pyx_n_s_263); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __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__LocaleTime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3452
 * 
 * 
 * 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 = 3452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));

  /* "pandas/tslib.pyx":3455
 *     """Handle conversion from format directives to regexes."""
 * 
 *     def __init__(self, locale_time=None):             # <<<<<<<<<<<<<<
 *         """Create keys/values.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_1__init__, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_480)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_481));
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3497
 *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_3__seqToRE, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_483)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s___TimeRE__seqToRE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3516
 *         return '%s)' % regex
 * 
 *     def pattern(self, format):             # <<<<<<<<<<<<<<
 *         """Return regex pattern for the format string.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_5pattern, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_486)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s__pattern, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3539
 *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_5tslib_6TimeRE_7compile, 0, NULL, __pyx_n_s_263, ((PyObject *)__pyx_k_codeobj_488)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_11, __pyx_n_s__compile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/tslib.pyx":3452
 * 
 * 
 * class TimeRE(dict):             # <<<<<<<<<<<<<<
 *     """Handle conversion from format directives to regexes."""
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyDict_Type))));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyDict_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyDict_Type))));
  if (PyDict_SetItemString(((PyObject *)__pyx_t_11), "__doc__", ((PyObject *)__pyx_kp_s_489)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_11), __pyx_n_s__TimeRE, __pyx_n_s_263); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __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__TimeRE, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __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":3543
 *         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_462); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3543; __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 = 3543; __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 = 3543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/tslib.pyx":3546
 * # 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 = 3546; __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 = 3546; __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 = 3546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

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

  /* "pandas/tslib.pyx":3548
 * _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 = 3548; __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 = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;

  /* "pandas/tslib.pyx":3550
 * _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_103_calc_julian_from_U_or_W, NULL, __pyx_n_s_263); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_105, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __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 int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static 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 long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

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